I'm using Firefox 3.5b4.
This alerts [object Object],[object Object]:
var jsonString = '[{"foo": "one", "bar": 1}, {"foo": "two", "bar": 2}]';
var jsonObjects = JSON.parse(jsonString);
alert(jsonObjects);
This alerts an empty string, i.e. jsonObjects is null.
var jsonString = "[{'foo': '1', 'bar': 2}, {'foo': '3', 'bar': 4}]";
var jsonObjects = JSON.parse(jsonString);
alert(jsonObjects);
Likewise for unquoted property names, i.e. {foo: '1', bar: 2}.
What's going on? Am I missing something obvious, or is there a rule about double and single quoting with JSON.parse? All three versions work OK with eval.