swathi jakkam
unread,Apr 10, 2012, 1:52:42 AM4/10/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to v8-users
Hi,
I have problem with JSON.parser function in v8.How to use the JSON
methods in V8.Anyone could you tell me the idea about JSON in
javascript.
Issue: Json.parser() function gives wrong output.
i wrote sample example like below:
var foo = {};
foo.bar = "new property";
foo.baz = 3;
var JSONfoo = JSON.stringify(foo);
print(JSONfoo);
//To make JSONfoo back into a JavaScript object just do:
var backToJS = json_parse(JSONfoo);
print(backToJS);
expected result is : {“bar”:”new property”, “baz”:3} // this
is for JSONfoo
{bar:’new property’, baz:
3} // this is for backToJS
But here getting output is wrong
Coming result is : {“bar”:”new property”, “baz”:3} // this
is for JSONfoo
[object
object] // this is for backToJS
Every time I got [object] message for JSON.parser().
I don’t known Why this is coming?
Regards,
swathi