Boost C++ Libraries: Ticket #4387: property_tree json_grammar should accept array at root level https://svn.boost.org/trac10/ticket/4387 <p> According to <a class="ext-link" href="http://www.ietf.org/rfc/rfc4627.txt?number=4627"><span class="icon">​</span>http://www.ietf.org/rfc/rfc4627.txt?number=4627</a>, section 2: </p> <blockquote> <p> "A JSON text is a serialized object or array." </p> </blockquote> <p> However, the implementation of the json_grammar in json_parser_read.hpp does not accept an array at the root level. Rather, it expects an object only. </p> <p> This means read_json cannot successfully parse the following, even though according to rfc4627 it is valid jSON: </p> <p> ["apple","orange","tomato"] </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4387 Trac 1.4.3 Sebastian Redl Fri, 18 Feb 2011 16:29:50 GMT <link>https://svn.boost.org/trac10/ticket/4387#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4387#comment:1</guid> <description> <p> Fixed on trunk in <a class="changeset" href="https://svn.boost.org/trac10/changeset/68992" title="Allow top-level array in PTree JSON parser, as requested in bug 4387.">r68992</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sebastian Redl</dc:creator> <pubDate>Mon, 16 May 2011 18:33:41 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4387#comment:2 https://svn.boost.org/trac10/ticket/4387#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/71991" title="Merge r68990-68993, several fixes to PTree. Fixes bug 1678. Fixes bug 4387.">[71991]</a>) Merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/68990" title="Fix a compile error in PTree JSON parser.">r68990</a>-68993, several fixes to PTree. Fixes bug 1678. Fixes bug 4387. </p> Ticket Sebastian Redl Mon, 16 May 2011 18:34:44 GMT <link>https://svn.boost.org/trac10/ticket/4387#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4387#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/71992" title="Merge r68990-68993, several fixes to PTree. Fixes bug 1678. Fixes bug ...">[71992]</a>) Merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/68990" title="Fix a compile error in PTree JSON parser.">r68990</a>-68993, several fixes to PTree. Fixes bug 1678. Fixes bug 4387. Forgot to commit these together with the header part. </p> </description> <category>Ticket</category> </item> </channel> </rss>