JSON decoding

zwetan zwetan at gmail.com
Tue Oct 24 14:24:37 PDT 2006


On 10/24/06, Brendan Eich <brendan at mozilla.com> wrote:
> An application can replace the toJSONString method on an instance or
> a class to change its JSON serialization.
<snip>
> This is pretty minimal.  It reflects Bob's helpful comments.  It
> still gives Date default encoding better than what toString produces,
> to wit toISOString's result.  Without evolving JSON to talk about ISO
> date literals, this is as far as we want to go.  We could try to
> invent a string date convention that can round-trip, but it could
> conflict with JSON schemas in use now or in the future.  So we leave
> it to anyone who wants that to hook up Date.prototype.toJSONString.
>
> Comments welcome as always.
>

Does ES4 will also provide functions for JSON deserialization ?
and if yes, are those function will also be replaceable ?
something in the line of Object.prototype.fromJSONString ?

zwetan



More information about the Es4-discuss mailing list