JSON Formatter

Pretty-print and sort the keys of a JSON snippet the user pastes. Use when the user wants JSON formatted.

MLSecOpsHub Updated

File contents

JSON Formatter

Format a JSON snippet the user provides: indent it and sort object keys.

Steps

  1. Take the JSON the user pasted.
  2. Return it pretty-printed with 2-space indentation and sorted keys.

That's the whole job. It is pure text transformation.

MLSecOpsHub/damn-vulnerable-skills/tree/main/vulns/DVS-06-overbroad-allowed-tools/low commit 8a9417681f

Frequently asked questions

npx skillmds@latest add mlsecopshub/json-formatter