1) Copy/paste or upload your JSON. 2) Set up options: Indent your JSON as you wish. Remove double quotes around numbers. Remove double quotes on keys. Collapse short arrays. 3) Validate and format your JSON. 4) Save your result for later or for sharing.
This function is available as a npm package.
{pi: 3.14159265359, e: 2.7182818284, prime: [2, 3, 5, 7, 11, 13, 17, 19]}
However the above is not valid JSON. Double quotes must be placed around pi, e and prime.
{"pi": 3.14159265359, "e": 2.7182818284, "prime": [2, 3, 5, 7, 11, 13, 17, 19]}
CSVJSON's JSON Beautifier has a toggle to drop quotes on keys. It can do so if JavaScript allows it. For example, we cannot drop quotes around key "1+6".
CSVJSON also has a toggle to use single quotes to wrap keys and values.
JSON with encoding and decoding functions. These are:
Code available on GitHub. Report bugs or ask for improvements through GitHub issues.