Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5210: JSON writer does not allow attributes and children in the same node
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-23 16:17:39
#5210: JSON writer does not allow attributes and children in the same node
------------------------------------------------------------+---------------
Reporter: Christian Ceelen <christian.ceelen@â¦> | Owner: cornedbee
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: property_tree
Version: Boost 1.46.0 | Severity: Problem
Resolution: invalid | Keywords:
------------------------------------------------------------+---------------
Changes (by cornedbee):
* status: new => closed
* resolution: => invalid
Comment:
A property tree node can have both data and children, i.e. a tree can look
like this:
{{{
root: <- has only children
child1: "child 1 data" <- has both data and children
child1.1: "child 1.1 data" <- has only data
child1.2: "child 1.2 data" <- has only data
child2: "child 2 data" <- has only data
}}}
There is no way to represent such a tree as JSON. A JSON node can be an
object (it has named children), an array (it has unnamed children), or a
basic data item (string, number, boolean, null). There is no JSON node
that can have both direct data and children.
Therefore, the validation function rejects such trees when generating
JSON.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5210#comment:1> 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:05 UTC