id summary reporter owner description type status milestone component version severity resolution keywords cc 9495 property_tree json_read should accept iterators instead of just streams Egbert van der Wal Sebastian Redl "For a project I am using boost::property_tree abundantly. The trees need to be transfered across all kinds of interfaces and I have ran the limited function call several times. It requires a istream to read from. To make matters worse, as soon as it enters the function, a complete copy is made to a vector. And that happens when I already had to make a copy because the read_json method expects to consume all input data, which rarely happens for me. I know the exact beginning and ending position in the stream, but there is no way to specify this. The following function signature would be prefered: {{{#!cpp template void read_json_internal(Iterator begin, Iterator end, Ptree &pt, const std::string &filename) }}} This signature could still be used by the existing read_json_internal, which first converts this to a vector and then passed the vector iterators begin and and to this function, to avoid code duplication. Of course, the proper front-end in json_parser.hpp needs to be added to. The benefit is that this method can operate directly on my input sequence where I can specify exactly where the JSON states and where the JSON ends, avoiding all copies completely. I will attach a patch based on SVN Trunk that will accomplish this. " Patches new To Be Determined property_tree Boost Development Trunk Optimization