Boost C++ Libraries: Ticket #11092: Boost write_graphml writes non-conformant GraphML for boolean attributes https://svn.boost.org/trac10/ticket/11092 <p> Boolean attributes are serialized as 0 and 1. They should be written as "false" and "true" instead. </p> <p> The GraphML spec does not specify what values are acceptable, but according to the GraphML primer, "The type of the GraphML-Attribute can be either boolean, int, long, float, double, or string. These types are defined like the corresponding types in the Java(TM)-Programming language.". </p> <p> In source code, Java would allow only "true" and "false" for boolean values. If we add any representation that Java's Boolean.parseString() recognizes, the case wouldn't matter, but "1" still wouldn't parse as true. </p> <p> Other libraries like NetworkX fail to parse GraphML with boolean attributes written by Boost. See also https :<em> github.com / networkx / networkx / pull / 1063. </em></p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11092 Trac 1.4.3 freedesktop@… Tue, 10 Mar 2015 01:12:34 GMT <link>https://svn.boost.org/trac10/ticket/11092#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11092#comment:1</guid> <description> <p> Correction: Boolean.parseString() =&gt; Boolean.parseBoolean() </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 12 Dec 2016 17:24:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11092#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11092#comment:2</guid> <description> <p> This also affects the <a class="missing wiki">TinkerPop/Gremlin</a> graph packages -- it cannot serialize graphMLs written by boost, because Boolean.valueOf("1") == false. </p> </description> <category>Ticket</category> </item> </channel> </rss>