News for hackers. Stuff that matters.
Re:Why is JSON so popular? Developers want out of the syntax... by ntownsend on Friday March 19, 2010 @10:15AM (#1204159)
The argument that XML can have various different structures for storing a person's name, while JSON provides one simple solution, doesn't fly. You could run into something like { "Person": { "property": { "type": "first-name", "value": "John" }, "property": { "type": "last-name", "value": "Smith" } } }

This begs the question, "Why would you do something that convoluted?" Well, you can ask the same of the XML examples, and the answer probably boils down to requirements (or incompetence?).

Re:Why is JSON so popular? Developers want out of the syntax... by arockwell on Friday March 19, 2010 @10:52AM (#1204249)
My gut feeling on this is that almost anyone can recognize that writing JSON like that is wrong. However, trying to determine if

  <person first-name="John" last-Name="Smith" />
is better than

  <person>
      <first-name>John</first-name>
      <last-name>Smith</last-name>
  </person>
is often very difficult. In the wild, I've seen both strategies used depending on the situation.
Re:Why is JSON so popular? Developers want out of the syntax... by yread on Friday March 19, 2010 @04:29PM (#1205179)
Actually it's very simple. If you don't need children don't make them. I measured it once and storing stuff in attributes had ~10 times faster parsing in MSXML.
Re:Why is JSON so popular? Developers want out of the syntax... by JeremyStein on Friday March 19, 2010 @11:07AM (#1204277)
Please don't write "begs the question" when you mean "raises the question". http://begthequestion.info/
Re:Why is JSON so popular? Developers want out of the syntax... by stanleydrew on Friday March 19, 2010 @11:28AM (#1204331)
But if we know what he meant why does this matter? Language exists to convey meaning, and I think we all understood what he meant, so I don't see the problem here.
Re:Why is JSON so popular? Developers want out of the syntax... by loup-vaillant on Friday March 19, 2010 @11:49AM (#1204381)
The problem lies in dilution: if people recognize a new meaning in an old phrase, it becomes more difficult to convey the old meaning. (Because you can't use that phrase any more.)

There is also the case where you thought you conveyed the new meaning, while it hasn't caught on yet (meaning, you made a mistake). So, better stay safe and stick to the old meaning while we can.

Re:Why is JSON so popular? Developers want out of the syntax... by vidarh on Friday March 19, 2010 @01:01PM (#1204563)
The dilution has already happened, and this cause is pretty much lost.

English is my second language. I've known the "new" meaning since I was a kid.

I've to date maybe seen the "old" meaning used a handful of times other than in examples given by people trying to correct someone using the new meaning.

Outside of academia I'd be surprised to see it at all. I suspect it would be confusing to more people than would recognize it.

Re:Why is JSON so popular? Developers want out of the syntax... by Confusion on Friday March 19, 2010 @05:27PM (#1205332)
The dilution has already happened, and this cause is pretty much lost.

Don't give up too easily.

Outside of academia I'd be surprised to see it at all. That's because it's originally an academical term for a logical fallacy. This is like the abuse of 'eigenvalues' by all kinds of crackpots and we should never stop fighting that kind of language abuse. We can't keep inventing new terms, just because others have hijacked the previous one.

Re:Why is JSON so popular? Developers want out of the syntax... by Confusion on Friday March 19, 2010 @05:27PM (#1205331)
The dilution has already happened, and this cause is pretty much lost.

Don't give up too easily.

Outside of academia I'd be surprised to see it at all. That's because it's originally an academical term for a logical fallacy. This is like the abuse of 'eigenvalues' by all kinds of crackpots and we should never stop fighting that kind of language abuse. We can't keep inventing new terms, just because others have hijacked the previous one.

Re:Why is JSON so popular? Developers want out of the syntax... by loup-vaillant on Friday March 19, 2010 @05:16PM (#1205307)
OK for this particular cause. I was more about a general stance: trying to slow down the rate of change in languages. The slower the change, the less confusing the language.
Re:Why is JSON so popular? Developers want out of the syntax... by sjs on Friday March 19, 2010 @11:48AM (#1204378)
"I know this sounds like a semantic quibble, but words mean things." -- unknown
Re:Why is JSON so popular? Developers want out of the syntax... by jamesbritt on Friday March 19, 2010 @06:26PM (#1205449)
"But if we know what he meant why does this matter? Language exists to convey meaning, and I think we all understood what he meant, so I don't see the problem here."

I often don't know what the user meant. It makes for extra work to stop and think what possible meaning was intended. Some thing when people use "less" for "fewer". I have to think, did they mean "lesser" or "fewer"?

Re:Why is JSON so popular? Developers want out of the syntax... by dasil003 on Friday March 19, 2010 @12:17PM (#1204449)
I respect the difference, but I'm afraid there's not much point in trying to educate people. This has already been an utterly lost cause for decades (at least).
Re:Why is JSON so popular? Developers want out of the syntax... by ntownsend on Friday March 19, 2010 @11:31AM (#1204337)
Whoops. You're right. I'm embarrassed because I do know the difference.
Re:Why is JSON so popular? Developers want out of the syntax... by sfk on Friday March 19, 2010 @07:34PM (#1205566)
The Oxford Dictionary lists "raises the question" as a valid interpretation of the phrase.
Re:Why is JSON so popular? Developers want out of the syntax... by wlievens on Friday March 19, 2010 @10:44AM (#1204225)
Or library defaults. X-Stream, for instance, will by default use subtags rather than attributes, for primitive properties.