Will be a part of the forthcoming ECMAScript 5 standard. I suspect it will be available in early forms in many of the browsers. I thought you were already using it in the LFC, so maybe we should export it at the API so it is generally available for LZX? It looks like Lorien (cc-ed) might be able to use it.

I believe the main bits are:

JSON.stringify which takes an Object and produces a string, and JSON.parse which takes a string and produces an Object (similar to the one that was stringified).

The built-in data types each have a method .toJSON that can be overridden, and stringify and parse each take an optional filter function that can be used to restrict or extend the encoding.

There is probably an open source implementation of the proposed standard that we could grab for runtimes that do not yet have it built in. Check out http://json.org.

Reply via email to