Opened 10 years ago
Closed 9 years ago
#7072 closed Bugs (duplicate)
Extra whitespace in write_json
| Reported by: | Owned by: | Sebastian Redl | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | property_tree |
| Version: | Boost 1.51.0 | Severity: | Cosmetic |
| Keywords: | Cc: | n.sakisaka@… |
Description
#include <boost/regex.hpp> using boost::property_tree::ptree; stringstream sstream; ptree tree; ptree arrayTree;
arrayTree.push_back(make_pair("", "arrayItem")); tree.add_child("root", arrayTree); write_json(sstream, tree, false); std::cout << sstream.str() << std::endl;{"root":} should be {"root":arrayItem}
Attachments (1)
Change History (4)
by , 10 years ago
| Attachment: | json_parser_write.hpp.patch added |
|---|
comment:1 by , 10 years ago
| Cc: | added |
|---|
comment:2 by , 10 years ago
comment:3 by , 9 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Here's the patch.
This bug seems to be present since rev.37680. I assume many of us has been experiencing strangeness for outputs for quite a long time.