Please help with writing spec for async JSON APIs

joe joeedh at gmail.com
Sun Aug 2 17:15:26 UTC 2015


If we're speaking normatively, some of us don't see the point of using
unstructured object serialization for web communication at all (it's not
simply a binary-versus-text thing; I once implemented JSON's object model
in a binary format, and it had the same speed as the native JSON parser).
That said, JSON *is* a standard, and it'd be nice if I could support it in
more use cases (instead of telling cilents "can't do that, too slow").

If we must have JSON, let's at least make it minimally usable.  If that's
too much to ask, than perhaps it's time browsers supported ProtoBufs/STRUCT
type systems natively.

Joe


On Sat, Aug 1, 2015 at 11:35 PM, Morningstar, Chip <cmorningstar at paypal.com>
wrote:

> I confess I don't see the point of this proposal at all, at least with
> respect to being specifically about JSON.
>
> JSON parsing/stringification is pure computation; it's not like I/O where
> you need something special inside the language runtime's implementation in
> order to exploit the asynchrony.
>
> While it would be generally useful to be able to hand a random chunk of
> CPU-bound work off to another thread on another processor core, there's no
> point whatsoever in treating JSON as a special case of this.  JSON handling
> is just one use case for asynchronous computation in general.  Presumably
> once the language's async features are fully baked you should be able to
> just wrap a call to the existing JSON API inside an async function, and get
> this functionality (and much else besides) directly.
>
> Chip
>
>
> On Jul 31, 2015, at 8:03 PM, Mohsen Azimi <me at azimi.me> wrote:
>
> Hi,
>
> I stumbled on lack of async APIs for JSON parsing and stringifying in
> JavaScript a couple of weeks ago. I tried to hack
> <http://azimi.me/2015/07/30/non-blocking-async-json-parse.html> around it
> by abusing the W3C Fetch API but that's just a hack.
>
> Domenic suggested <https://twitter.com/domenic/status/626958415181393920>
> that we should write the proposal spec for native non-blocking JSON
> processing. I don't know what the API should look like but I made some
> assumptions and wrote the initial spec (if I can call it spec!) and
> published it in GitHub <https://github.com/mohsen1/async-json>.
>
> I need to learn the spec lingo and rewrite the spec in proper and standard
> language. I need help and resources to learn the language of the spec.
>
> Would you please review the proposal so far (including the outstanding PR)?
>
> Thanks,
> Mohsen
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150802/6da32da1/attachment-0001.html>


More information about the es-discuss mailing list