xgboost
|
Data structure representing JSON format. More...
#include <json.h>
Public Member Functions | |
Json () | |
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. More... | |
Json & | operator[] (int ind) const |
Index Json object with int, used for Json Array. More... | |
Value const & | GetValue () const & |
Return the reference to stored Json value. More... | |
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. Optional parameter mode for choosing between text and binary (ubjson) input. More... | |
static Json | Load (JsonReader *reader) |
Pass your own JsonReader. More... | |
static void | Dump (Json json, std::string *out, std::ios::openmode mode=std::ios::out) |
Encode the JSON object. Optional parameter mode for choosing between text and binary (ubjson) output. More... | |
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. More... | |
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:
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
default |
|
inlinenoexcept |
|
static |
Use your own JsonWriter.
|
static |
Encode the JSON object. Optional parameter mode for choosing between text and binary (ubjson) output.
|
static |
|
inline |
|
inline |
|
static |
Pass your own JsonReader.
|
static |
Decode the JSON object. Optional parameter mode for choosing between text and binary (ubjson) input.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |