|
Medial Code Documentation
|
Data structure representing JSON format. More...
#include <json.h>
Public Member Functions | |
| Json (JsonNumber number) | |
| Json & | operator= (JsonNumber number) |
| Json (JsonInteger integer) | |
| Json & | operator= (JsonInteger integer) |
| Json (JsonArray &&list) | |
| Json & | operator= (JsonArray &&array) |
| template<typename T , Value::ValueKind kind> | |
| Json (JsonTypedArray< T, kind > &&list) | |
| template<typename T , Value::ValueKind kind> | |
| Json & | operator= (JsonTypedArray< T, kind > &&array) |
| Json (JsonObject &&object) | |
| Json & | operator= (JsonObject &&object) |
| Json (JsonString &&str) | |
| Json & | operator= (JsonString &&str) |
| Json (JsonBoolean boolean) | |
| Json & | operator= (JsonBoolean boolean) |
| Json (JsonNull null) | |
| Json & | operator= (JsonNull null) |
| Json (Json const &other)=default | |
| Json & | operator= (Json const &other)=default |
| Json (Json &&other) noexcept | |
| Json & | operator= (Json &&other) noexcept |
| Json & | operator[] (std::string const &key) const |
| Index Json object with a std::string, used for Json Object. | |
| Json & | operator[] (int ind) const |
| Index Json object with int, used for Json Array. | |
| Value const & | GetValue () const & |
| Return the reference to stored Json value. | |
| Value const & | GetValue () && |
| Value & | GetValue () & |
| bool | operator== (Json const &rhs) const |
| IntrusivePtr< Value > const & | Ptr () const |
Static Public Member Functions | |
| static Json | Load (StringView str, std::ios::openmode mode=std::ios::in) |
| Decode the JSON object. | |
| static Json | Load (JsonReader *reader) |
| Pass your own JsonReader. | |
| static void | Dump (Json json, std::string *out, std::ios::openmode mode=std::ios::out) |
| Encode the JSON object. | |
| static void | Dump (Json json, std::vector< char > *out, std::ios::openmode mode=std::ios::out) |
| static void | Dump (Json json, JsonWriter *writer) |
| Use your own JsonWriter. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, Json const &j) |
Data structure representing JSON format.
Limitation: UTF-8 is not properly supported. Code points above ASCII are invalid.
Examples:
|
static |
Encode the JSON object.
Optional parameter mode for choosing between text and binary (ubjson) output.
|
static |
Decode the JSON object.
Optional parameter mode for choosing between text and binary (ubjson) input.