|
| | Json () noexcept |
| |
| | Json (std::nullptr_t) noexcept |
| |
| | Json (bool b) noexcept |
| |
| template<typename T , typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, bool >::value, int >::type = 0> |
| | Json (T v) noexcept |
| |
| template<typename T , typename std::enable_if< std::is_floating_point< T >::value, int >::type = 0> |
| | Json (T v) noexcept |
| |
| | Json (const char *s) |
| |
| | Json (const std::string &s) |
| |
| | Json (std::string &&s) |
| |
| | Json (std::initializer_list< Json > init) |
| | nlohmann-style brace initialisation.
|
| |
| | Json (const Json &other) |
| |
| | Json (Json &&other) noexcept |
| |
| Json & | operator= (const Json &other) |
| |
| Json & | operator= (Json &&other) noexcept |
| |
| | ~Json () |
| |
| std::string | dump (int indent=-1) const |
| |
| Type | type () const noexcept |
| |
| bool | is_null () const noexcept |
| |
| bool | is_boolean () const noexcept |
| |
| bool | is_number () const noexcept |
| |
| bool | is_number_integer () const noexcept |
| |
| bool | is_number_unsigned () const noexcept |
| |
| bool | is_number_float () const noexcept |
| |
| bool | is_string () const noexcept |
| |
| bool | is_array () const noexcept |
| |
| bool | is_object () const noexcept |
| |
| bool | is_discarded () const noexcept |
| |
| bool | is_primitive () const noexcept |
| |
| bool | is_structured () const noexcept |
| |
| std::size_t | size () const noexcept |
| | Number of elements (array/object), or 0 for null, 1 for any scalar.
|
| |
| bool | empty () const noexcept |
| | True for null, an empty array, or an empty object.
|
| |
| Json & | operator[] (const std::string &key) |
| |
| Json & | operator[] (const char *key) |
| |
| const Json & | operator[] (const std::string &key) const |
| |
| const Json & | operator[] (const char *key) const |
| |
| Json & | operator[] (int index) |
| |
| Json & | operator[] (std::size_t index) |
| |
| const Json & | operator[] (int index) const |
| |
| const Json & | operator[] (std::size_t index) const |
| |
| Json & | at (const std::string &key) |
| | Bounds/existence-checked access; throws JsonError when missing.
|
| |
| const Json & | at (const std::string &key) const |
| |
| Json & | at (std::size_t index) |
| |
| const Json & | at (std::size_t index) const |
| |
| bool | contains (const std::string &key) const |
| |
| bool | erase (const std::string &key) |
| |
| void | erase (std::size_t index) |
| |
| Json & | front () |
| |
| const Json & | front () const |
| |
| Json & | back () |
| |
| const Json & | back () const |
| |
| void | push_back (const Json &value) |
| |
| void | push_back (Json &&value) |
| |
| template<typename... Args> |
| Json & | emplace_back (Args &&... args) |
| |
| void | clear () |
| |
| template<typename T > |
| T | get () const |
| |
| template<typename T , typename std::enable_if<(std::is_arithmetic< T >::value||std::is_same< T, std::string >::value) &&!std::is_same< T, Json >::value, int >::type = 0> |
| | operator T () const |
| | Implicit conversion to arithmetic types and std::string, so call sites like int v = j["x"]; and std::string s = j["y"]; read naturally.
|
| |
| template<typename T > |
| T | value (const std::string &key, const T &default_value) const |
| | value(key, default): typed object lookup with a fallback.
|
| |
| std::string | value (const std::string &key, const char *default_value) const |
| | const char* default resolves to a std::string result (nlohmann parity).
|
| |
| iterator | begin () |
| |
| iterator | end () |
| |
| const_iterator | begin () const |
| |
| const_iterator | end () const |
| |
| const_iterator | cbegin () const |
| |
| const_iterator | cend () const |
| |
| ItemsProxy< false > | items () |
| |
| ItemsProxy< true > | items () const |
| |
| bool | operator== (const Json &other) const |
| |
| bool | operator!= (const Json &other) const |
| |
| Array & | as_array () |
| |
| const Array & | as_array () const |
| |
| Object & | as_object () |
| |
| const Object & | as_object () const |
| |
Definition at line 56 of file json.h.