[OT] Interested in good (fast, robust) boost-based JSON API

Can anyone recommend one such good targeted library up to Boost's standards you've had good success with? (with a boost-like commercial friendly license) I guess it would need to be Tuple and Spirit based to be well integrated to Boost, although it could also have a polymorphic base json::value class too. Thanks for any insights. --DD PS: C++ JSON libraries listed at http://json.org/ don't seem quite up to the task, thus my post. PPS: If Spirit-based, a library using Spirit V2 as released in Boost 1.41 would be preferred.

Dominique Devienne wrote:
Can anyone recommend one such good targeted library up to Boost's standards you've had good success with? (with a boost-like commercial friendly license)
Boost.PropertyTree has some support for parsing and writing JSON, but it doesn't preserve types. Sebastian

On Tue, Dec 1, 2009 at 9:38 AM, Sebastian Redl
Dominique Devienne wrote:
Can anyone recommend one such good targeted library up to Boost's standards you've had good success with? (with a boost-like commercial friendly license)
Boost.PropertyTree has some support for parsing and writing JSON, but it doesn't preserve types.
And even I whipped up a standards-compliant JSON parser in Boost.Spirit 2.1 in only two hours, would be easy to karma'ize it too to output (now that Spirit 2.1 is released with its interface no longer in flux, I really should finish that...)

On Tue, Dec 1, 2009 at 11:55 AM, OvermindDL1
On Tue, Dec 1, 2009 at 9:38 AM, Sebastian Redl
wrote: Dominique Devienne wrote:
Can anyone recommend one such good targeted library up to Boost's standards you've had good success with? (with a boost-like commercial friendly license)
Boost.PropertyTree has some support for parsing and writing JSON, but it doesn't preserve types.
And even I whipped up a standards-compliant JSON parser in Boost.Spirit 2.1 in only two hours, would be easy to karma'ize it too to output (now that Spirit 2.1 is released with its interface no longer in flux, I really should finish that...)
Sounds good :) Would you mind sharing the grammar and parser in http://boost-spirit.com/repository/grammars/show_contents.php perhaps, with a Boost like license? Thanks, --DD

On Tue, Dec 1, 2009 at 12:44 PM, Dominique Devienne
On Tue, Dec 1, 2009 at 11:55 AM, OvermindDL1
wrote: On Tue, Dec 1, 2009 at 9:38 AM, Sebastian Redl
wrote: Dominique Devienne wrote:
Can anyone recommend one such good targeted library up to Boost's standards you've had good success with? (with a boost-like commercial friendly license)
Boost.PropertyTree has some support for parsing and writing JSON, but it doesn't preserve types.
And even I whipped up a standards-compliant JSON parser in Boost.Spirit 2.1 in only two hours, would be easy to karma'ize it too to output (now that Spirit 2.1 is released with its interface no longer in flux, I really should finish that...)
Sounds good :)
Would you mind sharing the grammar and parser in http://boost-spirit.com/repository/grammars/show_contents.php perhaps, with a Boost like license?
I did post the old version (that worked on a much older Spirit trunk, not the current release) on the Spirit list a long while ago. I meant to update it and give it a better interface and a karma output too then give it to Spirit as an example, I just need to get motivated to give the little amount of time that I have available, to it. ;-) (*hint* poke me to get it done, random emails, that helps a ton).

On Tue, Dec 1, 2009 at 4:42 PM, OvermindDL1
On Tue, Dec 1, 2009 at 12:44 PM, Dominique Devienne
wrote: Would you mind sharing the grammar and parser in http://boost-spirit.com/repository/grammars/show_contents.php perhaps, with a Boost like license?
I did post the old version (that worked on a much older Spirit trunk, not the current release) on the Spirit list a long while ago. I meant to update it and give it a better interface and a karma output too then give it to Spirit as an example, I just need to get motivated to give the little amount of time that I have available, to it. ;-)
I'm still interested in just the Spirit 2.1 grammar for JSON if you don't mind, to implement just an event-based SAX-like parser for JSON. I'd happily use a full reading and writing impl, but I'd be happy with just the grammar for now.
(*hint* poke me to get it done, random emails, that helps a ton).
Consider yourself poked ;) Thanks, --DD

On Tue, Dec 1, 2009 at 4:03 PM, Dominique Devienne
On Tue, Dec 1, 2009 at 4:42 PM, OvermindDL1
wrote: On Tue, Dec 1, 2009 at 12:44 PM, Dominique Devienne
wrote: Would you mind sharing the grammar and parser in http://boost-spirit.com/repository/grammars/show_contents.php perhaps, with a Boost like license?
I did post the old version (that worked on a much older Spirit trunk, not the current release) on the Spirit list a long while ago. I meant to update it and give it a better interface and a karma output too then give it to Spirit as an example, I just need to get motivated to give the little amount of time that I have available, to it. ;-)
I'm still interested in just the Spirit 2.1 grammar for JSON if you don't mind, to implement just an event-based SAX-like parser for JSON. I'd happily use a full reading and writing impl, but I'd be happy with just the grammar for now.
(*hint* poke me to get it done, random emails, that helps a ton).
Consider yourself poked ;) Thanks, --DD
Ew... I really did make this back when I was still learning Spirit, I
can make it better now for sure...
Just to show you the simple grammar for JSON parsing though, I was
trying to follow the Spec *to*the*letter*, and this is what I came up
with (which I definitely need to redesign for the modern Spirit2.1).
As stated, this is for the old trunk Spirit so it might not compile
with the current version...
struct JSON_grammar : qi::grammar

OvermindDL1 wrote:
On Tue, Dec 1, 2009 at 4:03 PM, Dominique Devienne
wrote: On Tue, Dec 1, 2009 at 4:42 PM, OvermindDL1
wrote: Would you mind sharing the grammar and parser in http://boost-spirit.com/repository/grammars/show_contents.php perhaps, with a Boost like license? I did post the old version (that worked on a much older Spirit trunk, not the current release) on the Spirit list a long while ago. I meant to update it and give it a better interface and a karma output too
On Tue, Dec 1, 2009 at 12:44 PM, Dominique Devienne
wrote: then give it to Spirit as an example, I just need to get motivated to give the little amount of time that I have available, to it. ;-) I'm still interested in just the Spirit 2.1 grammar for JSON if you don't mind, to implement just an event-based SAX-like parser for JSON. I'd happily use a full reading and writing impl, but I'd be happy with just the grammar for now. (*hint* poke me to get it done, random emails, that helps a ton). Consider yourself poked ;) Thanks, --DD
[...]
Yuck, that really is ugly... That should show you how it works, but yeah, wait until I can actually redesign it. I do not have time right this moment (keep poking me and I may have this odd hour here or there), but should have some dedicated time late next week, just keep on poking/emailing me.
Poke poke poke poke poke... hmmm is that enough for a week's poke? ;-) Ah need two more: poke poke. :-) Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon
participants (4)
-
Dominique Devienne
-
Joel de Guzman
-
OvermindDL1
-
Sebastian Redl