4 ms·
Traditionally single quotes are used to represent a single character and double quotes represent strings, so that's presumably where it came from. As for why, I
by kaolinite 15y ago
Traditionally single quotes are used to represent a single character and double quotes represent strings, so that's presumably where it came from. As for why, I'm unsure. One of the great things about JSON is that its syntax is very close to the syntax that many languages use for representing arrays and the like, so perhaps it was to stay in keeping with languages like C where strings cannot use single quotes. That's just a guess though and I personally don't think it's a good enough reason - I'm always caught out by single quotes in JSON.