I'm a Javascript newbie so bear with me. How can I serialise an object to JSON in Javascript? Is there a common external library I can use? I'm aware of jquery.getJSON(...) but this doesn't seem to quite do what I want, which is to simply get a string containing the JSON for an object in a piece of Javascript.
|
|
||||
|
|
|
Are you looking for something like the |
|||||
|
|
Download
|
|||||||||||||
|
|
Just to keep it backward compatible I load Crockfords JSON-library from cloudflare CDN if no native JSON support is given (for simplicity using jQuery):
|
||||
|
|