I have problems with JSON in playN 1.0.3 on HTML5.
When I call JSON.parse(mystring)
and try to decode the json document below I get this error:
com.google.gwt.core.client.JavaScriptException: (SyntaxError): JSON.parse: unexpected end of data
Note: JSON.parse()
works in Java-Mode with this string perfectly. Moreover I validated the JSON-document using a JSON document validator (JSONLint).
Does anybody see the problem? Maybe the array or the objects in the array are the problem, right? Maybe it's too long? In reality, my array has 15 objects, which look similar to these three objects in the array below.
{
"Array": [
{
"CorrectAnswer": "A",
"AnswerA": "A",
"AnswerD": "D",
"Artist": "Artist",
"AnswerB": "B",
"Title": "Title",
"AnswerC": "C"
},
{
"CorrectAnswer": "A",
"AnswerA": "A",
"AnswerD": "D",
"Artist": "Artist",
"AnswerB": "B",
"Title": "Title",
"AnswerC": "C"
},
{
"CorrectAnswer": "A",
"AnswerA": "A",
"AnswerD": "D",
"Artist": "Artist",
"AnswerB": "B",
"Title": "Title",
"AnswerC": "C"
}
]
}