News for hackers. Stuff that matters.
Re:Why is JSON so popular? Developers want out of the syntax... by blasdel on Saturday March 20, 2010 @04:32AM (#1206197)
Python lets you put the commas before the items, like so:

  { 'foo':'barbaz'
  , 'k2':'v2'
  }
Ruby doesn't like that though. Both Python and Ruby will ignore an extra trailing comma on the last item, which gives you another way of avoiding the common bug you describe.
Re:Why is JSON so popular? Developers want out of the syntax... by weichi on Saturday March 20, 2010 @03:31PM (#1206853)
I've never written any Ruby, but I refuse to believe that Ruby cares about which line has the comma. Am I misunderstanding something?