20#ifndef RIPPLE_JSON_JSON_WRITER_H_INCLUDED 
   21#define RIPPLE_JSON_JSON_WRITER_H_INCLUDED 
   23#include <xrpl/json/json_forwards.h> 
   24#include <xrpl/json/json_value.h> 
  222template <
class Write>
 
  229template <
class Write>
 
  233    switch (value.
type())
 
  261            int const size = value.
size();
 
  262            for (
int index = 0; index < size; ++index)
 
  275            for (
auto it = members.
begin(); it != members.
end(); ++it)
 
  278                if (it != members.
begin())
 
 
 
  299template <
class Write>
 
  339                o.
write(
static_cast<char const*
>(data), n);
 
 
 
Decorator for streaming out compact json.
 
Compact(Json::Value &&jv)
Wrap a Json::Value for compact streaming.
 
friend std::ostream & operator<<(std::ostream &o, Compact const &cJv)
 
Outputs a Value in JSON format without formatting (not human friendly).
 
std::string write(Value const &root) override
 
void writeValue(Value const &value)
 
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string.
 
void write(std::ostream &out, Value const &root)
Serialize a Value in JSON format.
 
void writeWithIndent(std::string const &value)
 
bool isMultineArray(Value const &value)
 
void writeValue(Value const &value)
 
void writeArrayValue(Value const &value)
 
void pushValue(std::string const &value)
 
std::string indentString_
 
Writes a Value in JSON format in a human friendly way.
 
std::string write(Value const &root) override
Serialize a Value in JSON format.
 
std::string indentString_
 
void pushValue(std::string const &value)
 
void writeValue(Value const &value)
 
void writeArrayValue(Value const &value)
 
void writeWithIndent(std::string const &value)
 
bool isMultineArray(Value const &value)
 
UInt size() const
Number of values in array or object.
 
char const * asCString() const
 
Members getMemberNames() const
Return a list of the member names.
 
Abstract class for writers.
 
virtual std::string write(Value const &root)=0
 
void write_string(Write const &write, std::string const &s)
 
void write_value(Write const &write, Value const &value)
 
JSON (JavaScript Object Notation).
 
void stream(Json::Value const &jv, Write const &write)
Stream compact JSON to the specified function.
 
std::string valueToString(Int value)
 
std::string valueToQuotedString(char const *value)
 
@ stringValue
UTF-8 string value.
 
@ arrayValue
array value (ordered list)
 
@ intValue
signed integer value
 
@ objectValue
object value (collection of name/value pairs).
 
@ uintValue
unsigned integer value
 
std::ostream & operator<<(std::ostream &, Value const &root)
Output using the StyledStreamWriter.