chaîne Mon JSON ressemble à ceci,Quel est le problème dans cette chaîne JSON?
[{"id" : "38","heading" : "Can you also figure out how to get me back the 10 hours I
sp.....","description" : "Im having a very similar problem with the Login control - again it always generates a default style containing border-collapse - only in this case .....","img_url" : "~/EventImages/EventImages1274014884460.jpg","catogory" : "News","doe" : "15-05-2010 "},{"id" : "40","heading" : "How to remove the border of each row (from the gridview cont.....","description" : "How to remove the border of each row (from the gridview control). ? I set borderWidth to 0, and the borders are not displayed with IE, but the top a.....","img_url" : "~/EventImages/EventImages1274028613023.jpg","catogory" : "News","doe" : "15-05-2010 "},
{"id" : "41","heading" : "Realmac Software | How to fix FancyZoom popup? (pops up behi.....","description" : "The first thing we need is an options dialog, not only to make it easier for the user, but also because later we will want to launch this dialog from .....","img_url" : "~/EventImages/EventImages1274037688120.jpg","catogory" : "News","doe" : "15-05-2010 "},
{"id" : "42","heading" : "hi jacon
dsadddaddddddddddddddd","description" : "hi jacon
This is a little messy because the clientHeight/Width properties can mean different things in different browsers, and even different thi.....","img_url" : "~/EventImages/EventImages1274041211533.jpg","catogory" : "News","doe" : "15-05-2010 "}
Mais obtenir l'erreur,
unterminated string literal
....
EDIT:
J'utilisé cela, mais il n'a pas travail,
var newjson = cfreturn("""" & ToString(HfJsonValue).ReplaceAll("(['""\\\/\n\r\t]{1})", "\\$1") & """") ;
var jsonObj = eval('(' + newjson + ')');
Erreur: missing) after argument list
Code Source:
var newjson = cfreturn("""" & ToString(HfJsonValue).ReplaceAll("(['""\\\/\n\r\t]{1})", "\\$1") & """");
EDIT:
Il y a une marque '
dans la chaîne JSON qui cause le problème ... toute suggestion
Est-ce que le contenu inclut des guillemets ou des guillemets? Sont-ils échappés? – Mauro
Etes-vous absolument certain qu'il n'y a pas de '' '' dans le premier "Im" du champ 'description'?Selon où vous recherchez la chaîne JSON (Firebug, par exemple) il peut être nettoyé pour vous, donc vous ne voyez jamais le problème ... –
duplication possible de [Quel est le problème dans cette chaîne json?] (Http: // stackoverflow.com/questions/2847228/what-is-wrong-in-this-json-string) –