GSoC: JSON project

Hi all, I am a student and am writing a proposal for Google Summer of Code based on the JSON idea<http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Google_Summer_Of_Code_2008#json>. I was wondering if anyone has any addition thoughts on JSON serialization and how people feel about it in general. Thanks, Jeremy

On Mon, 07 Apr 2008 05:24:52 +0200, Jeremy Cowles <jeremy.cowles@gmail.com> wrote: Hi Jeremy,
I am a student and am writing a proposal for Google Summer of Code based on the JSON idea<http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Google_Summer_Of_Code_2008#json>. I was wondering if anyone has any addition thoughts on JSON serialization and how people feel about it in general.
there is a JSON parser (based on Boost.Spirit) and a writer in Boost.PropertyTree (see http://kaalus.atspace.com/ptree/doc/index.html#json_parser). The problem with the writer is though that all values (except numbers) are written as strings (for example you load a boolean value true but it's written as "true"). You might be able to use the code from Boost.PropertyTree though (and maybe improve the writer, too ;). Boris

Boris,
there is a JSON parser (based on Boost.Spirit) and a writer in Boost.PropertyTree (see http://kaalus.atspace.com/ptree/doc/index.html#json_parser). The problem with the writer is though that all values (except numbers) are written as strings (for example you load a boolean value true but it's written as "true"). You might be able to use the code from Boost.PropertyTree though (and maybe improve the writer, too ;).
Thank you for the links, I will definitely take your suggestion into consideration. I have actually been doing some research on the different C++ JSON implementations, and there seems there is no *complete* end-to-end solution. There are many holes and inconsistencies, like the one you mentioned. My aim is to create a complete implementation, based on the standard [i|o]archive Serialization interface that supports various encoding formats, reads and writes, creates output in standard format, is well documented and has tests. Do you think this is a worth while goal? Jeremy

On Mon, 07 Apr 2008 18:33:49 +0200, Jeremy Cowles <jeremy.cowles@gmail.com> wrote: Jeremy,
[...]Thank you for the links, I will definitely take your suggestion into consideration. I have actually been doing some research on the different C++ JSON implementations, and there seems there is no *complete* end-to-end solution. There are many holes and inconsistencies, like the one you mentioned. My aim is to create a complete implementation, based on the standard [i|o]archive Serialization interface that supports various encoding formats, reads and writes, creates output in standard format, is well documented and has tests. Do you think this is a worth while goal?
I haven't used Boost.Serialization yet so others might have a more qualified opinion. However as far as I know the file formats used to save data are not really important as even if XML or JSON are used the data can still only be loaded by another C++ application using Boost.Serialization? The XML or JSON files can of course be processed by parsers implemented in other programming languages. But for data exchange a library like Boost.PropertyTree seems to be more suitable? Even if there are no practical use cases (or maybe I just don't see them?) adding JSON archives to Boost.Serialization would still be a worthwhile goal: It will make you familiar with that library and might lead you to new ideas which will help to improve the library. Adding JSON archives would be the first step to become a Boost.Serialization Pro. :) Boris

Thanks again Borris. I have submitted my proposal for the project, so hopefully I will be asking a whole lot of questions soon :) Jeremy
participants (2)
-
Boris
-
Jeremy Cowles