3#include <xrpl/basics/ToString.h>
4#include <xrpl/basics/contract.h>
5#include <xrpl/json/Output.h>
6#include <xrpl/json/json_value.h>
115 operator=(
Writer&&) noexcept;
143 template <typename Scalar>
167 template <
typename Type>
211 template <
typename Type>
Lightweight wrapper to tag static string.
constexpr char const * cStr() const
Writer implements an O(1)-space, O(1)-granular output JSON writer.
void finishAll()
Finish all objects and arrays.
void set(std::string const &tag, Type t)
Add a key, value assignment to an object.
void rawAppend()
Add a comma before this next item if not the first item in an array.
void output(json::StaticString const &t)
void startRoot(CollectionType)
Start a new collection at the root level.
void startAppend(CollectionType)
Start a new collection inside an array.
void implOutput(std::string const &)
void output(std::string const &)
void output(Type t)
Output numbers or booleans.
Writer(Output const &output)
void startSet(CollectionType, std::string const &key)
Start a new collection inside an object.
std::unique_ptr< Impl > impl_
void rawSet(std::string const &key)
Emit just "tag": as part of an object.
void append(Scalar t)
Append a value to an array.
void finish()
Finish the collection most recently started.
JSON (JavaScript Object Notation).
std::function< void(boost::beast::string_view const &)> Output
void check(bool condition, std::string const &message)
XRPL_NO_SANITIZE_ADDRESS void Throw(Args &&... args)