Home | Libraries | People | FAQ | More |
boost::property_tree::json_parser::write_json
// In header: <boost/property_tree/json_parser.hpp> template<typename Ptree> void write_json(std::basic_ostream< typename Ptree::key_type::value_type > & stream, const Ptree & pt, bool pretty = true);
Translates the property tree to JSON and writes it the given output stream.
Note | |
---|---|
Any property tree key containing only unnamed subkeys will be rendered as JSON arrays. |
Parameters: |
|
||||||
Requires: |
pt cannot contain keys that have both subkeys and non-empty data. |
||||||
Throws: |
json_parser_error In case of error translating the property tree to JSON or writing to the output stream. |