35 enum JSONType { JSONType_Null, JSONType_String, JSONType_Bool, JSONType_Number, JSONType_Array, JSONType_Object };
44 JSONValue(
const std::wstring &m_string_value);
48 JSONValue(
const JSONArray &m_array_value);
49 JSONValue(
const JSONObject &m_object_value);
54 bool IsString()
const;
56 bool IsNumber()
const;
58 bool IsObject()
const;
60 const std::wstring &AsString()
const;
62 double AsNumber()
const;
63 const JSONArray &AsArray()
const;
64 const JSONObject &AsObject()
const;
66 std::size_t CountChildren()
const;
67 bool HasChild(std::size_t index)
const;
69 bool HasChild(
const wchar_t* name)
const;
71 std::vector<std::wstring> ObjectKeys()
const;
73 std::wstring Stringify(
bool const prettyprint =
false)
const;
75 static JSONValue *Parse(
const wchar_t **data);
78 static std::wstring StringifyString(
const std::wstring &str);
79 std::wstring StringifyImpl(
size_t const indentDepth)
const;
80 static std::wstring Indent(
size_t depth);
88 std::wstring *string_value;
89 JSONArray *array_value;
90 JSONObject *object_value;
Definition: JSONValue.h:37