new JSON decoder supporting typed properties, typed arrays, dates

12 views
Skip to first unread message

saverio

unread,
Feb 28, 2010, 6:39:23 PM2/28/10
to ActionScript 3 Core Library
Hello.

For a project I'm in, I have developed an extension of the JSON en/
decoders, which support:
1- Date serialization in UTC "YYYY-MM-DD hh:mm:ss" format
2- Deserialization to typed object, with every property (not only the
base ones, but also Date and other typed objects) deserialized to the
correct class
3- Deserialization to typed arrays, only when the array elements are
instances of a single class (subclasses are not supported, as there's
no way to guess the subclass to decode to). The array decoding for
array properties is done using ArrayElementType metadata, so the
project must be compiled accordingly (-keep-as3-metadata
+=ArrayElementType)

Vectors are not supported for now (at least I have not even started to
try them)

If anyone is interested, I could post the results as a branch of the
lib (it's completely compatible with the standard one, as I added two
new static methods to JSON and 2 new classes + an interface, no
existing code is touched).

Please, Mike, Daniel, Christian, tell me something.

Best regards

Saverio

Reply all
Reply to author
Forward
0 new messages