JSON decoding

Peter Hall peterjoel at gmail.com
Thu Nov 2 16:14:27 PST 2006


>
> Does anyone else have an opinion?


I like how AS3 handles custom AMF encoding.
Native objects are encoded using the default implementation, and most
other objects just has its public properties encoded, as if it is a
generic object. But you can choose to implement an interface, which
the encoder checks for and lets you write out whatever you like.

I like this because it does not involve polluting all objects with
this extra method, particularly if JSON is optional for
implementation.

Peter



More information about the Es4-discuss mailing list