JSON generation in C/C++

2011-08-01 Thread Tommi Virtanen
We've talked about generating/parsing JSON a few times, and how we've run into edge cases whenever we've rolled our own functions for that. I've mentioned this C library a few times, but I'm not sure if I've actually sent the link to anyone.. Here's a C library for generating/parsing JSON, written

Re: JSON generation in C/C++

2011-08-01 Thread Tommi Virtanen
On Mon, Aug 1, 2011 at 09:24, Tommi Virtanen wrote: > We've talked about generating/parsing JSON a few times, and how we've > run into edge cases whenever we've rolled our own functions for that. > I've mentioned this C library a few times, but I'm not sure if I've > actually sent the link to anyo

Re: JSON generation in C/C++

2011-08-01 Thread Sage Weil
On Mon, 1 Aug 2011, Tommi Virtanen wrote: > We've talked about generating/parsing JSON a few times, and how we've > run into edge cases whenever we've rolled our own functions for that. > I've mentioned this C library a few times, but I'm not sure if I've > actually sent the link to anyone.. Here's

Re: JSON generation in C/C++

2011-08-01 Thread Sage Weil
On Mon, 1 Aug 2011, Tommi Virtanen wrote: > On Mon, Aug 1, 2011 at 09:24, Tommi Virtanen > wrote: > > We've talked about generating/parsing JSON a few times, and how we've > > run into edge cases whenever we've rolled our own functions for that. > > I've mentioned this C library a few times, but I

Re: JSON generation in C/C++

2011-08-01 Thread Tommi Virtanen
On Mon, Aug 1, 2011 at 09:40, Sage Weil wrote: > Heh, you forgot the link again?  :) Yup, it's Monday.. https://github.com/akheron/jansson > That's basically what JSONFormatter is doing, except it has some higher > level methods for opening object vs array sections, and can add whitespace > for

Re: JSON generation in C/C++

2011-08-01 Thread Noah Watkins
- Original Message - > From: "Tommi Virtanen" > To: "ceph-devel" > Sent: Monday, August 1, 2011 10:24:50 AM > Subject: JSON generation in C/C++ > > j = StreamingJSONObject(fd) > j.dump(key, value) > j.dump(key2, value2) > j.close() You

Re: JSON generation in C/C++

2011-08-01 Thread Colin Patrick McCabe
On Mon, Aug 1, 2011 at 9:42 AM, Sage Weil wrote: > On Mon, 1 Aug 2011, Tommi Virtanen wrote: >> On Mon, Aug 1, 2011 at 09:24, Tommi Virtanen >> wrote: >> > We've talked about generating/parsing JSON a few times, and how we've >> > run into edge cases whenever we've rolled our own functions for th

Re: JSON generation in C/C++

2011-08-01 Thread Colin Patrick McCabe
On Mon, Aug 1, 2011 at 9:24 AM, Tommi Virtanen wrote: > We've talked about generating/parsing JSON a few times, and how we've > run into edge cases whenever we've rolled our own functions for that. > I've mentioned this C library a few times, but I'm not sure if I've > actually sent the link to an

Re: JSON generation in C/C++

2011-08-01 Thread Sage Weil
On Mon, 1 Aug 2011, Colin Patrick McCabe wrote: > On Mon, Aug 1, 2011 at 9:24 AM, Tommi Virtanen > wrote: > > We've talked about generating/parsing JSON a few times, and how we've > > run into edge cases whenever we've rolled our own functions for that. > > I've mentioned this C library a few time

Re: JSON generation in C/C++

2011-08-01 Thread Tommi Virtanen
On Mon, Aug 1, 2011 at 11:04, Colin Patrick McCabe wrote: > One thing that neither Jansson nor JSON-C offer, to my knowledge, is > the ability to do SAX-style parsing of a JSON document. In other > words, to set up a bunch of function pointers and have them called at > various points during parsin