|
Boost : |
Subject: Re: [boost] Official JSON Package
From: Giacomo Drago (giacomo_at_[hidden])
Date: 2015-05-01 14:49:33
On 2015-04-30 23:53, Michael Ainsworth wrote:
> Is there an official Boost package for reading and writing JSON data?
>
> I know of JSON Spirit, but this is not (to my knowledge) official. I also know the Boost.PropertyTree works, but doesnot have full support.
>
> Michael
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
Hi Michael,
I am currently endeavouring to write a DOM-free JSON reader/writer. This
is the writer: https://github.com/giacomodrago/minijson_writer, the
reader is in the workings.
I do believe JSON reading and writing is I/O business and should be
implemented as such. The JSON writer I released is not the usual
object["field"] = value thing, it is a decorator around a stream. It
does not allocate memory. One rarely performs DOM manipulations on a
JSON object. I don't quite see the point of building an in-memory
object, and allocate multiple buffers on the heap just for the sake of
serialising the object immediately after, and then throwing everything away.
As for the reader, I am designing it in a way that memory allocations
can be kept to the very minimum, for example it will be possible to
optionally re-use the provided input buffer for storing the parsed tokens.
I'd be happy to receive your feedback, and if you think this may be a
nice addition to Boost, you may back my application for a review process.
Best
Giacomo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk