![]() |
Open Lighting Architecture
0.9.0
|
A JSON formatter.
#include <ola/web/Json.h>
JsonObject obj;
obj.Add("name", "simon");
obj.Add("age", 10);
obj.Add("male", true);
JsonArray *friends = obj.AddArray("friends");
friends->Add("Peter");
friends->Add("Bob");
friends->Add("Jane");
const string output = JsonWriter::AsString(json);
Files | |
| file | Json.h |
| Header file for the JSON formatter. | |
Classes | |
| class | ola::web::JsonValue |
| The base class for JSON values. More... | |
| class | ola::web::JsonStringValue |
| A string value. More... | |
| class | ola::web::JsonUIntValue |
| A unsigned int value. More... | |
| class | ola::web::JsonIntValue |
| A signed int value. More... | |
| class | ola::web::JsonBoolValue |
| A Bool value. More... | |
| class | ola::web::JsonNullValue |
| The null value. More... | |
| class | ola::web::JsonRawValue |
| A raw value, useful if you want to cheat. More... | |
| class | ola::web::JsonObject |
| A JSON object. JSON Objects are key : value mappings, similar to dictionaries in Python. More... | |
| class | ola::web::JsonArray |
| An array of JSON values. Arrays in JSON can contain values of different types. More... | |
| class | ola::web::JsonWriter |
| A class that writes a JsonValue to an output stream. More... | |
1.8.1.2