tags:

views:

38

answers:

2

This is my json object. Everything seems to be fine, but I don't know why I'm seeing this. "missing ] after element list"

Can somebody help? Here is my json:

{"rows":
  [  {"type": "fft_vel",
       "axis": "x",
       "pwrhgh": 7.44475138121547E-02,
       "pwrlow": 2.35267034990792E-02,
       "hzlow": 244.827586206897,
       "hzhgh": 506.896551724138,
       "dataid": 0,
       "id": 467,
       "name": "2008-02-08 14:24:22  -  creating first  active alarms testing",
       "title": "RMS displacement alert on Pump 11 Sensor 2",
       "description": "An RMS displacement value of 0.04495 inches was recorded on Pump 11 Sensor 2 on 2\u002F8\u002F2008. This is between the RMS displacement alert levels of 0.0442 inches and 0.12 inches.",
       "time_stamp": "2\u002F8\u002F2008 2:24:22 PM",
       "sensor_id": 550003281
      }
  ]
}
A: 

According to JSONLint, the json you posted is valid

http://www.jsonlint.com/

Could your problem lie elsewhere?

{
    "rows": [
        {
            "type": "fft_vel",
            "axis": "x",
            "pwrhgh": 7.44475138121547E-02,
            "pwrlow": 2.35267034990792E-02,
            "hzlow": 244.827586206897,
            "hzhgh": 506.896551724138,
            "dataid": 0,
            "id": 467,
            "name": "2008-02-08 14:24:22 - creating first active alarms testing",
            "title": "RMS displacement alert on Pump 11 Sensor 2",
            "description": "An RMS displacement value of 0.04495 inches was recorded on Pump 11 Sensor 2 on 2\u002F8\u002F2008. This is between the RMS displacement alert levels of 0.0442 inches and 0.12 inches.",
            "time_stamp": "2\u002F8\u002F2008 2:24:22 PM",
            "sensor_id": 550003281
        }
    ]
}
Raj Kaimal
A: 

It might be an error message from the browser (XmlHttpRequest object) rather than from the code parsing the JSON. There are two settings that I think can affect how the browser verifies the response:

Check that you are requesting the data as text or json, and not as xml or html.

Check that you are setting the content type of the response to application/json or text/plain, and not text/html or application/xml.

Guffa