20 #ifndef RIPPLE_JSON_WRITER_H_INCLUDED
21 #define RIPPLE_JSON_WRITER_H_INCLUDED
23 #include <ripple/basics/ToString.h>
24 #include <ripple/basics/contract.h>
25 #include <ripple/json/Output.h>
26 #include <ripple/json/json_value.h>
134 operator=(
Writer&&) noexcept;
162 template <typename Scalar>
186 template <
typename Type>
230 template <
typename Type>
255 ripple::Throw<std::logic_error>(message);
void rawAppend()
Add a comma before this next item if not the first item in an array.
void implOutput(std::string const &)
void append(Scalar t)
Append a value to an array.
void finish()
Finish the collection most recently started.
void set(std::string const &tag, Type t)
Add a key, value assignment to an object.
void check(bool condition, std::string const &message)
void startAppend(CollectionType)
Start a new collection inside an array.
constexpr const char * c_str() const
void startRoot(CollectionType)
Start a new collection at the root level.
void finishAll()
Finish all objects and arrays.
JSON (JavaScript Object Notation).
void output(Json::StaticString const &t)
std::unique_ptr< Impl > impl_
void startSet(CollectionType, std::string const &key)
Start a new collection inside an object.
Lightweight wrapper to tag static string.
void rawSet(std::string const &key)
Emit just "tag": as part of an object.
void output(Type t)
Output numbers or booleans.
Writer(Output const &output)
void output(std::string const &)
Writer implements an O(1)-space, O(1)-granular output JSON writer.