PDA

View Full Version : Valid JSON but none valid Javascript?


sauber
06-18-2008, 03:13 PM
Hi i have the folowing json string...

[
{"LineId":"2326",
"StopPoint":"999",
"Time":"2008-06-03 08:45:00.0"},
{"LineId":"2326",
"StopPoint":"999",
"Time":"2008-06-03 08:45:00.0"}
]

Which is valid in json parser but i get a "Syntaxerror - [{"LineId":"2326",^" in Firefox webdeveloper script validator!

and the site dosent work in IE6, but works just fine with IE7, FF, Opera dose any one have any idea why?

Kor
06-18-2008, 03:50 PM
Which is valid in json parser but i get a "Syntaxerror - [{"LineId":"2326",^" in Firefox webdeveloper script validator!

and the site dosent work in IE6, but works just fine with IE7, FF, Opera dose any one have any idea why?
You get the error when, where? Can you give us more details, please?

rnd me
06-19-2008, 04:00 AM
works fine in firefox for me (ver 3)

sauber
06-19-2008, 07:16 AM
Kor its not a error that is affecting the site but the firefox plugin in webdeveloper/javascript validator is giving me "Syntaxerror - [{"LineId":"2326",^"!

so the flow is its a ajax aplication fetching a json string...([
{"LineId":"2326",
"StopPoint":"999",
"Time":"2008-06-03 08:45:00.0"},
{"LineId":"2326",
"StopPoint":"999",
"Time":"2008-06-03 08:45:00.0"}
])

from a servlet every minute and for every respons this javascript error appers in the javascript validator console.

- rnd me the site works fine its a validation error.