Subject: Re: [boost] [serialization] or [spirit] JSON Archives
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2010-06-15 10:33:02


On Tue, 15 Jun 2010 11:12:58 -0300, Fernando Pelliccioni
<fpelliccioni_at_[hidden]> wrote:
> On Tue, Jun 15, 2010 at 4:41 AM, Stephan Menzel
> <stephan.menzel_at_[hidden]>wrote:
>
>> On Tue, Jun 15, 2010 at 9:20 AM, Juraj Ivančić
<juraj.ivancic_at_[hidden]>
>> wrote:
>> >
>> > Have you seen Boost Property Tree library? I have not tried it, but
it
>> > does support JSON format to some extent. It might already have all
you
>> > need.
>>
>> Indeed. A JSON parser in spirit has been done multiple times. The one
>> in property tree is one example. It should also contain a serializer.
>> TinyJSON is another. And yet, all of them are spirit classic. So at
>> least, upon inventing this particular wheel the 3rd time it should be
>> done in Qi.
>>
>> Cheers,
>> Stephan
>>
>>
>
> Hi,
>
> The parser should be written Qi, there is no other option for me.
> On the other hand, the objective is not only a parser but a Serializer,
so
> I
> think you should follow the design of Boost.Serialization.
> I have not checked yet, but I think that Property Tree does not comply
with
> these premises.

True. PTree's parser is written in Spirit.Classic (currently, though I
eventually want to rewrite it), and is definitely not an Archive. PTree's
JSON serializer does not use Spirit at all.

Sebastian