Boost logo

Boost Users :

Subject: Re: [Boost-users] [OT] Interested in good (fast, robust)
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-12-01 17:39:57


On Tue, Dec 1, 2009 at 12:40 PM, Dominique Devienne <ddevienne_at_[hidden]> wrote:
> On Tue, Dec 1, 2009 at 1:24 PM, Richard Ulrich <richi_at_[hidden]> wrote:
>> I'm using json_spirit from
>> http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx
>> for parsing big but simple json files.
>> So far I didn't have any problems with it.
>
> One objection I have with json_spirit is that its value is rather
> heavy memory wise, and also forces initializing all of the members.
> Maybe that's no longer true, I got the code below in Mar09. I think
> something boost::variant-based would be more suitable (incorrectly
> mentioned using tuple in my first post, when I meant variant). --DD
>
> namespace json_spirit {
>    enum Value_type { ... };
>    typedef std::vector< Pair > Object;
>    typedef std::vector< Value > Array;
>
>    class Value { ...
>    private:
>        Value_type type_;
>        std::string str_;
>        Object obj_;
>        Array array_;
>        bool bool_;
>        int i_;
>        double d_;
>    };
> }

It has a few other issues as well. I think I commented on that
article a while back actually about many of the issues... Mine has no
such problems, yes I use Boost.Variant. :)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net