Reputation: 1727
My question is sort of stupid that why
JSON.stringify({"annotation": [{"x":1, "y":2}, {"x":1, "y":2}]})
does not return
{"annotation": [{"x": 1, "y": 2}, {"x": 1, "y": 2}]}
but returns
{"annotation":"[{\"x\": 1, \"y\": 2}, {\"x\": 1, \"y\": 2}]"}
and how can I get the first output?
Upvotes: 0
Views: 544
Reputation: 116664
Are you using Prototype? This question may be related:
JSON.stringify() array bizarreness with Prototype.js
Upvotes: 2