parsin json fails
I am opening a socket ant getting a doc with json over the net. heres a code snipet.
| response | = conn.read(); | ||||
| lines | = response.split(/\n/); | ||||
| var j | = lines[lines.length-1]; | ||||
| conn.close(); | |||||
| j = eval(j); |
(why the hell I cant paste into here without it becoming a table I'll never know)
if I chane the last line to alert(j) it shows me the correct json string. When I do eval(j) I get the message "unable to execute script at line 1 ; expected
am I missing something here?
