Skip to content
5cript edited this page Jul 10, 2015 · 3 revisions

Welcome to the SimpleJSON wiki!

Quick Reference

stringify (std::ostream& stream, std::string const& name, T const& what, StringificationOptions options = DEFAULT_OPTIONS) -> std::ostream&

  • stream: An output stream to dump all data to
  • name: A name for the object to stringify. This parameter does not always get used. This depends on the options and where the call lies in the stringification tree.
  • what: An object to stringify, this can be a STL class or classes providing a special stringify member function.
  • options: An options class. You usually pass JSON::ProduceNamedOutput.

Writes JSON representation of T into stream

parse (T& value, std::string const& name, PropertyTree const& tree, ParsingOptions const& options = DEFAULT_PARSER_OPTIONS) -> void

  • value: Some object to write into
  • name: What is the tree node / json object property called?
  • tree: An object retrieved by parse_json(std::istream& stream)
  • options: Parsing options. For now you can only specify behaviour on parsing errors.

Transforms tree into object.

parse_json (std::istream& stream) -> PropertyTree

  • stream: Some sort of stream

Reads JSON from stream and creates a boost::property_tree (wrapped in PropertyTree)

Clone this wiki locally