[Project_owners] JSON and extensions

Philip Chee philip.chee at gmail.com
Fri Mar 3 16:52:29 EST 2006

On Thu, 2 Mar 2006 18:26:27 -0800 (PST), Eric H. Jung wrote:

> Has anyone successfully used JSON (http://www.json.org/json.js) with a Firefox/Mozilla extension?
> It's a means to de/serialize (un/marshall) objects, in same vein as XML or RDF de/serialization.

> The following works in an HTML page opened in Firefox, but not in an extension:

> function MyClass() {
>   this.foo = "foo";
> }
> alert(JSON.stringify(new MyClass()));

You don't say what errors you are getting in the JS console. I may be a
Slan, but I've just shampooed my hair and my telepathic tendrils are still
drying out, so I can't read your mind at the moment.

Also what does typeof (new MyClass()) return in a HTML page, and from a
chrome script?

Philip Chee <philip at aleytys.pc.my>, <philip.chee at gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]If it works, rip it apart and find out why!
* TagZilla 0.059

More information about the Project_owners mailing list