Header <boost/libs/trial.protocol/include/trial/protocol/json/writer.hpp>

namespace trial {
  namespace protocol {
    namespace json {
      template<typename CharT, std::size_t N = 2 * sizeof(void *)>
        class basic_writer;

      typedef basic_writer< char > writer;
    }
  }
}

Class template basic_writer

trial::protocol::json::basic_writer — Incremental JSON writer.

Description

Generate JSON output incrementally by appending C++ data.

basic_writer public construct/copy/destruct

  1. template<typename T> basic_writer(T & buffer);
    Construct an incremental JSON writer.
    The buffer type can be any for which a buffer wrapper exists.

    Parameters:

          buffer       A buffer where the JSON formatted output is stored.

basic_writer public member functions

  1. std::error_code error() const noexcept;

  2. size_type level() const noexcept;

  3. template<typename T> size_type value();
    Write structural output.

  4. template<typename T> size_type value(T && value);
    Write data output.

  5. size_type literal(const view_type &) noexcept;
    Write raw output.