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

307"Invalid Label" error

Expand Messages
  • Ryan Huff
    Apr 2, 2006
    • 0 Attachment
      Hello. Ordinarily I wouldn't ask others to debug a problem I'm having
      with MY code, but I'm stuck. Being a total newbie to JSON, I'm afraid
      I don't have enough experience to understand what this error means.

      When I eval the json string, FireFox gives me an error that simply
      says "Invalid label" (and points to the ':' between "mapid" and "1").

      here's my code:

      var json =
      eval('{"mapid":"1","us_metric":"us","out_and_back":"0","rspoints":[{"key":"-117.8695678711_33.7391868646","lat":"33.7391868646","long":"-117.8695678711","order":"0","type":"point","turn":"null","street":"null","elevation":"99.3","distance":"0.00","previous":"","next":"-117.9176330566_33.6271985166"},{"key":"-117.9176330566_33.6271985166","lat":"33.6271985166","long":"-117.9176330566","order":"1","type":"point","turn":"null","street":"null","elevation":"94.3","distance":"0.00","previous":"-117.8695678711_33.7391868646","next":"-117.6635742187_33.6100445737"},{"key":"-117.6635742187_33.6100445737","lat":"33.6100445737","long":"-117.6635742187","order":"2","type":"point","turn":"null","street":"null","elevation":"482.9","distance":"0.00","previous":"-117.9176330566_33.6271985166","next":""}],"center_lat":"33.674615719150","center_long":"-117.790603637650","zoom":7,"first_point_key":"33.7391868646_-117.8695678711","last_point_key":"-117.6635742187_33.6100445737"}');

      A more legible version of this string is:
      {
      "mapid":"1",
      "us_metric":"us",
      "out_and_back":"0",
      "rspoints":[
      {
      "key":"-117.8695678711_33.7391868646",
      "lat":"33.7391868646",
      "long":"-117.8695678711",
      "order":"0",
      "type":"point",
      "turn":"null",
      "street":"null",
      "elevation":"99.3",
      "distance":"0.00",
      "previous":"",
      "next":"-117.9176330566_33.6271985166"
      },
      {
      "key":"-117.9176330566_33.6271985166",
      "lat":"33.6271985166",
      "long":"-117.9176330566",
      "order":"1",
      "type":"point",
      "turn":"null",
      "street":"null",
      "elevation":"94.3",
      "distance":"0.00",
      "previous":"-117.8695678711_33.7391868646",
      "next":"-117.6635742187_33.6100445737"
      },
      {
      "key":"-117.6635742187_33.6100445737",
      "lat":"33.6100445737",
      "long":"-117.6635742187",
      "order":"2",
      "type":"point",
      "turn":"null",
      "street":"null",
      "elevation":"482.9",
      "distance":"0.00",
      "previous":"-117.9176330566_33.6271985166",
      "next":""
      }
      ],

      "center_lat":"33.674615719150",
      "center_long":"-117.790603637650",
      "zoom":7,
      "first_point_key":"33.7391868646_-117.8695678711",
      "last_point_key":"-117.6635742187_33.6100445737"
      }

      Thanks for your help!
    • Show all 2 messages in this topic