There are some things around the web but it's hard to tell what the standard is.
I need to do encoding and decoding. So JSON string -> AS object and AS object -> JSON string.
There are some things around the web but it's hard to tell what the standard is.
I need to do encoding and decoding. So JSON string -> AS object and AS object -> JSON string.
AFAIK, this is the standard: http://code.google.com/p/as3corelib/.
So, for instance, you can use JSON.decode(s)
and JSON.encode(o)
to go from string-to-object and object-to-string. I've never had a problem, except that you should wrap it in try/catch during decode because it can throw errors when the JSON is invalid.