JSON adding to my objects

A

Andrew Poulos

I've just added JSON handling to my work and the code from json.org to
create/parse the strings. The "compressed" version of the code starts:

if(!Object.prototype.toJSONString){Array...

This is working fine expect it appears to be messing with my objects. I
regularly iterate through my objects but now there's a new property
(toJSONString) that's buggering things up.

Admitedly I don't understand the JSON code but can I just delete the
property from each of my objects?

Andrew Poulos
 
D

Douglas Crockford

Andrew said:
I've just added JSON handling to my work and the code from json.org to
create/parse the strings. The "compressed" version of the code starts:

if(!Object.prototype.toJSONString){Array...

This is working fine expect it appears to be messing with my objects. I
regularly iterate through my objects but now there's a new property
(toJSONString) that's buggering things up.

See http://yuiblog.com/blog/2006/09/26/for-in-intrigue/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top