4#ifndef _SCENEPIC_JSON_VALUE_H_
5#define _SCENEPIC_JSON_VALUE_H_
152 const std::vector<JsonValue>&
values()
const;
155 const std::map<std::string, JsonValue>&
lookup()
const;
167 std::string m_string;
172 std::map<std::string, JsonValue> m_lookup;
173 std::vector<JsonValue> m_values;
Representation of a JSON value according to the specification at https://www.json....
Definition: json_value.h:30
float as_float() const
Return this object intepreted as a float.
const std::map< std::string, JsonValue > & lookup() const
Return the key/value lookup for this JSON object.
JsonValue(JsonType type)
Constructor.
JsonValue & operator=(double value)
Set the value of this object to the specified value.
const std::vector< JsonValue > & values() const
Return the values of this JSON array.
JsonValue & operator=(const std::string &value)
Set the value of this object to the specified value.
JsonValue(bool value)
Constructor.
JsonValue(double value)
Constructor.
const JsonValue & operator[](const std::string &key) const
Return the value stored in this object at the specified key.
JsonValue & operator[](const std::string &key)
Return the value stored in this object at the specified key.
JsonValue & operator=(std::int64_t value)
Set the value of this object to the specified value.
JsonValue(const std::string &value)
Constructor.
std::int64_t as_int() const
Return this object intepreted as an integer.
JsonType type() const
The type of this object.
void append(JsonValue &&object)
Append the object to this array.
JsonValue & operator=(const char *value)
Set the value of this object to the specified value.
JsonValue & operator=(std::string &&value)
Set the value of this object to the specified value.
void append(const JsonValue &object)
Append the object to this array.
std::string to_string() const
A string representation of this object in valid JSON.
double as_double() const
Return this object interpreted as a double.
JsonValue & operator=(bool value)
Set the value of this object to the specified value.
static JsonValue parse(std::istream &stream)
Parse a JsonValue object from the provided input stream.
static JsonValue nullSingleton()
Return a singleton representating a JSON NULL object.
JsonValue(std::string &&value)
Constructor.
JsonValue(std::int64_t value)
Constructor.
const std::string & as_string() const
Return this object interpreted as a string.
JsonValue(const char *value)
Constructor.
void resize(std::size_t size)
Convert this objec to an array of the specified size.
bool as_boolean() const
Return this object intepreted as a boolean.
Definition: audio_track.h:14
JsonType
Types of JsonValue objects.
Definition: json_value.h:17