Deux-points en json
Posté : 19 juin 2018, 14:46
Bonjour, j'essaye de convertir un array en json, cependant, cela me donne une erreur vu qu'il y a un lien avec deux-points. Comment puis je faire pour faire escape ce caractère ?
Exemple
Exemple
{"title":"<p>gfgfgfest<math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">"}
Erreur (en JS):
Unexpected token h in JSON at position 68
Cordialement