Ma question est un peu stupide pourquoiProblème de sérialisation javascript objet chaîne JSON
JSON.stringify({"annotation": [{"x":1, "y":2}, {"x":1, "y":2}]})
ne retourne pas
{"annotation": [{"x": 1, "y": 2}, {"x": 1, "y": 2}]}
mais retourne
{"annotation":"[{\"x\": 1, \"y\": 2}, {\"x\": 1, \"y\": 2}]"}
et comment puis-je la première sortie?
Dans quel navigateur vous rencontrez ce problème ?. S'il s'agit d'un navigateur sans support * natif * JSON *, quelle bibliothèque utilisez-vous? – CMS
J'utilise la bibliothèque largement utilisée de, http://www.json.org/json2.js. Cela semble être le conflit de Prototype. –