Reputation: 1863
When I execute the JSON formated code below, Firefox v20 will throw a SyntaxError: invalid label
error.
{
"aa": "bb"
}
but when I validate it using http://jsonlint.com/ it seems to be valid. So why is Firefox behaving like this ?
Upvotes: 0
Views: 72
Reputation: 1756
You have to place objects in places that are syntactically correct. For example, you can create an object like so:
var a = {"aa": "bb"};
Or you could pass that object to a function like:
func({"aa": "bb"});
Upvotes: 1