Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9496: property_tree write_json should output correct types in JSON
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-10 15:01:49
#9496: property_tree write_json should output correct types in JSON
------------------------------------------+---------------------------
Reporter: Egbert van der Wal <ewal@â¦> | Owner: cornedbee
Type: Patches | Status: closed
Milestone: To Be Determined | Component: property_tree
Version: Boost Development Trunk | Severity: Optimization
Resolution: invalid | Keywords:
------------------------------------------+---------------------------
Changes (by cornedbee):
* status: new => closed
* resolution: => invalid
Comment:
I'm not going to include this.
With or without this patch the behavior is not right: without it,
everything becomes a string when reading, and is written as such. With it,
everything still turns into a string on reading, but now some strings
suddenly become not-strings when writing.
In other words, this makes the writer harder to understand, and possibly
incorrect - what if I actually want to write "2.0" to the JSON file? Maybe
the JSON represents a music collection which contains the album by Garbage
of that name.
I do hope to eventually support a ptree that uses a variant value type to
accurately represent JSON, but until then I will stick with pure strings
as the simple and obvious thing. If that is insufficient for your needs,
I'm afraid you'll have to use a real JSON library.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9496#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC