37
DannySu
8y

I love Json format. It is so simple, powerful, easy to read and all that good stuffs. There is only one thing I wish Json could support, that's commenting.

Comments
  • 4
    The problem is that people use it for configuration files. With npm package.json you can use the "//" key for a comment but it is ugly..
    I kind of wish you didn't need quotes around everything in them.
  • 5
    Thats the reason i Like yaml
  • 4
    Comments were sacrificed for interoperability: https://plus.google.com/+DouglasCro...
  • 1
    Sometime I use Json to store data that view and edit by human. Cases like configuration files. It would be easier to communicate with people by commenting on the structure than writing a manual to explain.@irene
  • 0
    In some cases, no, or couldn't fit in a length of a sentence. Names could be ambiguous sometimes. @irene
  • 2
    Associate to it a json schema and you're good to go! This way you separate data from definitions.
  • 3
    It would be funny tho, serializing stuff with comments in it, I can already see it, when you call http://site.io/api you get a

    {

    // DONT USE IS BROKEN, SERIOUSLY DON'T USE THIS FIELD

    "id": "1"

    }
  • 0
    @irene yeah that's true which would be similar to an description attribute in xml.
  • 0
    And the answer is .... json5!!!
  • 0
    @json, please comment. 😉
  • 0
  • 0
    I also like JSON.
  • 0
    For this reason, the domain name of my website uses the json series.
    https://www.jsonformatting.com/
  • 0
    Fully agree, and that readability is exactly why a JSON file makes a perfectly fine little datastore for small stuff. That's the whole premise behind fjsondb — keep the format you already love, just add set/get/has/delete on top.
Add Comment