Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
spacem18447yThe 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. -
DannySu10957ySometime 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
-
DannySu10957yIn some cases, no, or couldn't fit in a length of a sentence. Names could be ambiguous sometimes. @irene
-
pily5307yAssociate to it a json schema and you're good to go! This way you separate data from definitions.
-
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"
} -
@irene yeah that's true which would be similar to an description attribute in xml.
-
kateliuyi234yFor this reason, the domain name of my website uses the json series.
https://www.jsonformatting.com/
Related Rants
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.
rant
json
random
formatting