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

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to