Check out the Boost PropertyTree Library. This has a JSON parser. I did use this to communicate JSON about 4 or 5 years ago before it was accepted to Boost and it worked well for my needs.
On 16 September 2011 10:06, Leo Cacciari <leo.cacciari@gmail.com> wrote:
for a project I'm working on, I need to be able to send JSON-encoded
objects on a network connection. I though that extending the
xml_[io]archive classes could do the trick, given that JSON, just like
xml, is based on representing an object by a collection of NVPs
(name-value pairs). However, I was unable to find an explication on
_how_ to extend that class, and I lost myself very quickly  when I tried
to follow the code in the source.

Thus I'm wondering...

First, should I actually modify xml_[io]archive or should I extend
text_[io]archive by adding serialization of NVPs?

If, as I think, the right way  is to extend text_[io]archive, and more
so if I should actually extend/modify  xml_[io]archive, does anyone have
suggestion on how to do that?

Even better, does anyone have a JSON serializer I could use in a
(*commercial*) project?

Thanks a lot for your help

Leo Cacciari

Aliae nationes servitutem pati possunt. Populi Romani est propria libertas.

Boost-users mailing list