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

825Re: json keys

Expand Messages
  • Don Owens
    Jun 28, 2007
      Do you mean the other way around? I.e., using unquoted keys? The
      JSON spec says that the keys must be quoted. The reason for this is
      that there is a bug in Javascript where it will treat a key as a
      keyword if it is unquoted and matches a keyword. Javascript is not
      smart enough to realize it should not be treating the key as a keyword.


      --- In json@yahoogroups.com, "Mark Ireland" <markincuba@...> wrote:
      >
      >
      > For a smaller jsObject can there be a json variable like this:
      >
      > {"totalItems":40, "itemsFound":2,
      "UNIQUEIDS":["js63013","js63009"],
      > "columnnames":["Company,Title,Name,Phone,Email"], items: ["js63013":
      > {"A1 Services",
      > "CEO",
      > "Jane Jones",
      > "800-555-2121",
      > "janejones@..."},
      >
      > "js63009":{"Acme",
      > "President",
      > "John Smith",
      > "800-555-1212",
      > "johnsmith@..."}
      > ]}
      >
      >
      > rather than this:
      >
      > {SalesDatabase2:
      > {totalItems:40, itemsFound:2, items: [
      > {Company:"A1 Services",
      > Title:"CEO",
      > Name:"Jane Jones",
      > Phone:"800-555-2121",
      > Email:"janejones@..."},
      >
      > {Company:"Acme",
      > Title:"President",
      > Name:"John Smith",
      > Phone:"800-555-1212",
      > Email:"johnsmith@..."}
      > ]}
      > }
      >
      > _________________________________________________________________
      > Advertisement: ninemsn Travel - Hot deals, travel ideas & Lonely Planet
      > guides.
      >
      http://ninemsn.com.au/share/redir/adTrack.asp?mode=click&clientID=799&referral=hotmailtagline&URL=http://travel.ninemsn.com.au/compIntro.aspx?compId=2404
      >
    • Show all 15 messages in this topic