Fastest JSON parser in the world is a D project

Rory McGuire via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Oct 15 04:06:14 PDT 2015


In browser JSON.serialize is the usual way to serialize JSON values.
The problem is that on D side if one does deserialization of an object or
struct. If the types inside the JSON don't match exactly then vibe freaks
out.

Another problem with most D JSON implementations is that they don't support
proper JSON, e.g. outputting nan as though it was a valid value etc...
browsers don't like that stuff.

For me the best D JSON implementation at the moment is actually jsvar by
Adam and its not even a JSON parser, it just has that as a needed feature.
It feels slow though I haven't benchmarked, but if I run it over a couple
of Gigs of data(Paged by 1000) it takes a long while.



On Thu, Oct 15, 2015 at 3:42 AM, Marco Leise via Digitalmars-d-announce <
digitalmars-d-announce at puremagic.com> wrote:

> Am Wed, 14 Oct 2015 10:22:37 +0200
> schrieb Rory McGuire via Digitalmars-d-announce
> <digitalmars-d-announce at puremagic.com>:
>
> > Does this version handle real world JSON?
> >
> > I've keep getting problems with vibe and JSON because web browsers will
> > automatically make a "1" into a 1 which then causes exceptions in vibe.
> >
> > Does yours do lossless conversions automatically?
>
> No I don't read numbers as strings. Could the client
> JavaScript be fixed? I fail to see why the conversion would
> happen automatically when the code could explicitly check for
> strings before doing math with the value "1". What do I miss?
>
> --
> Marco
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20151015/1ba0ec9e/attachment-0001.html>


More information about the Digitalmars-d-announce mailing list