Loading ...
Sorry, an error occurred while loading the content.

Re: [json] Sanity Check - New to JSON

Expand Messages
  • jonathan wallace
    I didn t say it was like C++, I just recommended visualizing it that way to help simplify the json that the user had posted. There were many places where
    Message 1 of 4 , Jun 26, 2010
    • 0 Attachment
      I didn't say it was like C++, I just recommended visualizing it that way to help simplify the json that the user had posted. There were many places where objects should have been used instead of arrays. Yes, arrays in json are more like a JS array or a multimap.




      ________________________________
      From: John Cowan <cowan@...>
      To: json@yahoogroups.com
      Sent: Sat, June 26, 2010 1:26:53 PM
      Subject: Re: [json] Sanity Check - New to JSON


      jonathan wallace scripsit:

      > Think of it like C++, that should help you figure out when to use
      > an object and when to use an array. Basically, an array is a set of
      > items that are the same object type.

      That's overly restrictive for JSON, whose aggregates are modeled on
      JavaScript. An array can be seen either as a sequence of data items
      (same type or different types, it makes no difference) or as an object
      (key-value mapping) where the keys are integers from 0 to n - 1.

      --
      Winter: MIT, John Cowan
      Keio, INRIA, cowan@...
      Issue lots of Drafts. http://www.ccil.org/~cowan
      So much more to understand!
      Might simplicity return? (A "tanka", or extended haiku)






      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.