Boost logo

Boost :

Subject: Re: [boost] JSON Parser GSoC 2013
From: Sergey Cheban (s.cheban_at_[hidden])
Date: 2013-04-10 20:19:01


11.04.2013 1:46, Stephan Bourgeois пишет:

> I am studying for an MSc in Computer Science at Oxford Brookes University.
> I have taken a compiler construction course this year and I am therefore
> interested in the JSON Parser idea for the Boost library.
There already is a json parser example in
http://svn.boost.org/svn/boost/trunk/libs/spirit/example/qi/json/

I think it would be good to move it to the boost::spirit repository and
to the release branch. It may be also a good idea to use this parser in
the boost::property_tree instead of the current one.

> The question is what data structure we should use to represent JSON
> objects, and how the user can access key/value pairs in those objects.
> (examples: Boost.PropertyTree, pre-existing C++ object, ...)
The structure used in the spirit/example/qi/json/ looks reasonable: the
json object is represented as a map<string, value> and the value is
represented as a boost::variant (with some wrapper around it).

I don't like the boost::property_tree approach because it loses all the
type information for the values.

-- 
Best regards,
Sergey Cheban

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk