20 #ifndef RIPPLE_JSON_OBJECT_H_INCLUDED
21 #define RIPPLE_JSON_OBJECT_H_INCLUDED
23 #include <ripple/json/Writer.h>
197 template <
typename Scalar>
253 template <
typename Scalar>
395 template <
typename Scalar>
404 template <
typename Scalar>
Json::Value & appendObject(Json::Value &)
Append a new subobject to a Json object.
Array setArray(std::string const &key)
Make a new Array at a key and return it.
void append(Scalar t)
Append a value to an array.
An Object that contains its own Writer.
@ arrayValue
array value (ordered list)
Array appendArray()
Append a new Array and return it.
Root(Writer &)
Each Object::Root must be constructed with its own unique Writer.
Object(Collection *parent, Writer *w)
void set(std::string const &tag, Type t)
Add a key, value assignment to an object.
std::unique_ptr< Object::Root > object_
void copyFrom(Json::Value &to, Json::Value const &from)
Copy all the keys and values from one object into another.
WriterObject stringWriterObject(std::string &s)
JSON (JavaScript Object Notation).
Value & append(const Value &value)
Append value to array at the end.
void checkWritable(std::string const &label)
void set(std::string const &key, Scalar const &)
Set a scalar value in the Object for a key.
@ objectValue
object value (collection of name/value pairs).
Proxy operator[](std::string const &key)
Represents a JSON array being written to a Writer.
Object setObject(std::string const &key)
Make a new Object at a key and return it.
Proxy(Object &object, std::string const &key)
Array(Collection *parent, Writer *w)
Collection & operator=(Collection &&c) noexcept
Object appendObject()
Append a new Object and return it.
Json::Value & setArray(Json::Value &, Json::StaticString const &key)
Add a new subarray at a named key in a Json object.
void append(Scalar const &)
Append a scalar to the Arrary.
Represents a JSON object being written to a Writer.
Lightweight wrapper to tag static string.
Json::Value & addObject(Json::Value &, Json::StaticString const &key)
Add a new subobject at a named key in a Json object.
std::unique_ptr< Writer > writer_
WriterObject(Output const &output)
Writer implements an O(1)-space, O(1)-granular output JSON writer.
void operator=(T const &t)
Json::Value & appendArray(Json::Value &)
Append a new subarray to a Json array.