Open Lighting Architecture  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
ola::web::JsonValue Class Reference

Detailed Description

The base class for JSON values.

Inheritance diagram for ola::web::JsonValue:
ola::web::JsonArray ola::web::JsonBoolValue ola::web::JsonIntValue ola::web::JsonNullValue ola::web::JsonObject ola::web::JsonRawValue ola::web::JsonStringValue ola::web::JsonUIntValue

Public Member Functions

virtual void ToString (std::ostream *output, unsigned int indent) const =0
 Output the string representation of this value to an ostream.

Protected Member Functions

void Indent (std::ostream *output, unsigned int indent) const
 Append the give number of spaces to the output stream.

Static Protected Attributes

static const unsigned int DEFAULT_INDENT = 2
 the default indent level

Member Function Documentation

void ola::web::JsonValue::Indent ( std::ostream *  output,
unsigned int  indent 
) const
inlineprotected

Append the give number of spaces to the output stream.

Parameters
outputthe ostream to append to
indentthe number of spaces to append
virtual void ola::web::JsonValue::ToString ( std::ostream *  output,
unsigned int  indent 
) const
pure virtual

Output the string representation of this value to an ostream.

Parameters
outputthe ostream to output to.
indentthe number of spaces to prepend.

Implemented in ola::web::JsonArray, ola::web::JsonObject, ola::web::JsonRawValue, ola::web::JsonNullValue, ola::web::JsonBoolValue, ola::web::JsonIntValue, ola::web::JsonUIntValue, and ola::web::JsonStringValue.


The documentation for this class was generated from the following file: