1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
/**
* @defgroup json JSON
* @brief JSON based APIs.
*
* The ola::web namespace provides:
* - Classes for parsing and serializing JSON (RFC 7159)
* - Implementation of JSON pointers (RFC 6901)
* - Classes for applying JSON Patch documents (RFC 6902)
* - A JSON Schema validator (http://www.json-schema.org).
*
* @par Serialization Example
*
* ~~~~~~~~~~~~~~~~~~~~~
\#include <ola/web/Json.h>
\#include <ola/web/JsonWriter.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 std::string output = JsonWriter::AsString(json);
~~~~~~~~~~~~~~~~~~~~~
*
* @par Parsing Example
*
* ~~~~~~~~~~~~~~~~~~~~~
\#include <ola/web/Json.h>
\#include <ola/web/JsonParser.h>
std::string error;
JsonValue *value = JsonParser::Parse(json_string, &error);
~~~~~~~~~~~~~~~~~~~~~
*/
|