tags:

views:

106

answers:

1

Attempting to use the data series from this example no longer passes the JSONLint test and as such attempting to use it with jQuery 1.4 fails. Specifically, returning it or data like it from an ajax request as type json will cause jQuery to throw an error. I know this worked perfectly well with jQuery 1.3.x. Does anyone have a solution?

+1  A: 

The problem is that that pseudo-JSON doesn't quote object keys:

 // right
 { "something": "value" }
 // wrong
 { something: "value" }

It's OK to do that in Javascript, but JSON syntax is stricter than Javascript syntax.

Pointy
Presumably flot should still work with the valid JSON syntax too. Have to try that next.
Jedidja