Any (working) JSON library for D2?

Lloyd Dupont ld at galador.net
Sun Jun 19 20:00:23 PDT 2011


Doost : http://www.dsource.org/projects/doost

Has a serializer that can read value to and from JSon! ;)

"Johannes Pfau"  wrote in message 
news:20110619193834.2c6afdf7 at jpf-Satellite-A100...

std.json doesn't work at all because of bug #2962 . I tried to remove
the problematic part from std.json and got it to compile (by disabling
support for floating point numbers...) but using it correctly creates
very verbose code:
----------------------------------------------------------------------
JSONValue a;
if(a.type == JSONTYPE.OBJECT)
    if("member" in a)
        if(a["member"].type == TYPE.NUMBER)
            uint count = a["member"].number;
----------------------------------------------------------------------
(pseudo-code, but that's the basic workflow when using std.json)

I know there also was a std.json replacement proposed by Robert Jacques
but it requires significant patches to phobos, a std.variant
replacement and the patches are against phobos 2.050 or something like
that, so those could be out of date.

To cut a long story short: does anyone know of another JSON library
for D2?
-- 
Johannes Pfau 



More information about the Digitalmars-d-learn mailing list