federomero / pretty-json

Atom plugin. Format JSON documents.
MIT License
94 stars 23 forks source link

Nice package fix quotations #82

Closed notwopr closed 5 years ago

notwopr commented 5 years ago

Hi,

I wanted ot test your package on a json output. The output file uses single quotes instead of double quotes but your program only recognizes double quotes. Can you fix it please? Thanks!

lexicalunit commented 5 years ago

Your output is wrong, the JSON standard does not allow single quotes for string values. You can read more about the JSON standard here: http://www.json.org/ There's also a number of Stackoverflow pages about this topic: https://stackoverflow.com/questions/4162642/single-vs-double-quotes-in-json/34855065

Basically, if you have a file with single quotes in it, then it's not a JSON file. It's something else.

notwopr commented 5 years ago

The API I use spits out single quotes for some reason even though it thinks it is json. I don't know why. Thanks.