Re: [Boost-bugs] [Boost C++ Libraries] #5211: XML output of arrays

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5211: XML output of arrays
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-14 14:39:57


#5211: XML output of arrays
-------------------------------------------------+-------------------------
  Reporter: Christian Ceelen | Owner: cornedbee
  <christian.ceelen@…> | Status: closed
      Type: Bugs | Component:
 Milestone: To Be Determined | property_tree
   Version: Boost 1.46.0 | Severity: Problem
Resolution: wontfix | Keywords:
-------------------------------------------------+-------------------------
Changes (by cornedbee):

 * status: new => closed
 * resolution: => wontfix

Comment:

 PTree has no notion of "attribute in a node" or "list of values". It has
 nodes with data and named children, where the name can be empty.

 As such, its match against various existing formats is imperfect.

 Your JSON fragment is translated by the JSON parser into a root node with
 one named child, "numbers", which in turn has four named children, all
 with the empty name. Neither root nor its child have data; the four leaf
 nodes have the strings from the JSON array as data.

 The XML mapping of PTree generates an element for every named child, with
 the element name being the name of the child. Since something empty isn't
 a valid name, nodes with the empty name aren't supported by the PTree XML
 mapping.

 In my ongoing docs improvement project, I will document the restrictions
 of each mapping more closely, and then implement software checks while
 writing to make sure nothing invalid is generated. But unnamed children
 won't be supported for XML writing.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5211#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