4 ms·
Because: ‘I am “really” angry’ Is much nicer than: “I am \”really\” angry”
by rbut 5y ago
Because:
‘I am “really” angry’
Is much nicer than:
“I am \”really\” angry”
- peoplefromibiza 5y agoand now you have two problems is this any better? 'I\'m "really" angry, don\'t do it again!' in many languages single quotes are used as apostrophes and are very very common, much more common than double quotes.
- kangalioo 5y agoNobody's forcing you to use single quotes as delimiters. "I'm \"really\" angry, don't do it again!"
- eptcyka 5y agoJson is not meant to be human readable or writeable.
- SigmundA 5y agoSecond sentence from json.org: "It is easy for humans to read and write."
- jenscow 5y agoBut JSON5 is.
- krapp 5y agoAll text based data formats are meant to be human readable and human writable, and humans read and write JSON all the time.
- eptcyka 5y agoYou wouldn't say that mammals write C all the time, would you? Front end development would be so much better if you could just spew json at people in a table.
- krapp 5y ago>You wouldn't say that mammals write C all the time, would you? Yes. Mammals do write C all the time, because humans are mammals. And C is meant to be human readable and writable. > Front end development would be so much better if you could just spew json at people in a table. That's literally what a JSON API is, and there are tons of them. And for each of them, a human had to be able to read and comprehend JSON responses and write JSON requests in code. There's a reason JSON is pretty-printed in the debug consoles of browsers. To say nothing of all of the package definitions or framework configs that are written (by hand) in JSON. The fact that most JSON is machine generated at present has nothing to do with its original design intent. Most Javascript, CSS and HTML are machine generated nowadays as well, but they were meant to be written by a person using a text editor.
- ghshephard 5y agoI've worked on 4+ years of technology that was entirely based on humans hand-tweaking, editing, and updating JSON configs. My text editors validate it quickly, and know how to fold, sort, prettify. Based on my experience (and editing it all day long) It's a very human readable and editable configuration.