[Boost-bugs] [Boost C++ Libraries] #9782: boost::property_tree::write_json always pretty prints ] when encoding arrays

Subject: [Boost-bugs] [Boost C++ Libraries] #9782: boost::property_tree::write_json always pretty prints ] when encoding arrays
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-16 12:23:32


#9782: boost::property_tree::write_json always pretty prints ] when encoding
arrays
------------------------------+---------------------------
 Reporter: fisher | Owner: cornedbee
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 generally the result is unnecessary white space in the resulting json
 string

 this can be resolved by changing line 96 of
 'boost\property_tree\detail\json_parser_write.hpp' from


 {{{
             stream << Str(4 * indent, Ch(' ')) << Ch(']');
 }}}


 to


 {{{
             if (pretty) stream << Str(4 * indent, Ch(' '));
             stream << Ch(']');
 }}}


 which is consistent in style and functionality with lines 120 and 121 of
 the same file

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