|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
JSON value with an associated SourceLocation. More...
#include <GREM/core/formats/json.hpp>

Public Member Functions | |
| ValueBase (VariantBase< Allocator > value, const allocator_type &allocator) | |
| Construct a JSON value. | |
| ValueBase (VariantBase< Allocator > value) | |
| Construct a JSON value. | |
| ValueBase (VariantBase< Allocator > value, const SourceLocation &source) | |
| Construct a JSON value with an associated source location. | |
| ValueBase (VariantBase< Allocator > value, const SourceLocation &source, const allocator_type &allocator) | |
| Construct a JSON value with an associated source location. | |
| ~ValueBase ()=default | |
| Destructor. | |
| ValueBase (const ValueBase &other, const allocator_type &allocator) noexcept | |
| Copy constructor. | |
| ValueBase (const ValueBase &other)=default | |
| Copy constructor. | |
| ValueBase (ValueBase &&other, const allocator_type &allocator) noexcept | |
| Move constructor. | |
| ValueBase (ValueBase &&other) noexcept=default | |
| Move constructor. | |
| ValueBase & | operator= (const ValueBase &other)=default |
| Copy assignment. | |
| ValueBase & | operator= (ValueBase &&other) noexcept(std::allocator_traits< allocator_type >::propagate_on_container_move_assignment::value||//NOLINT(cppcoreguidelines-noexcept-move-operations, performance-noexcept-move-constructor) std::allocator_traits< allocator_type >::is_always_equal::value)=default |
| Move assignment. | |
| GREM_ALWAYS_INLINE bool | isNull () const noexcept |
| Check if this value is of type Null. | |
| GREM_ALWAYS_INLINE Null & | getNull () & |
| Get this value as Null, throwing an exception if it is not actually null. | |
| GREM_ALWAYS_INLINE const Null & | getNull () const & |
| Get this value as Null, throwing an exception if it is not actually null. | |
| GREM_ALWAYS_INLINE Null && | getNull () && |
| Get this value as Null, throwing an exception if it is not actually null. | |
| GREM_ALWAYS_INLINE const Null & | getNull () const && |
| Get this value as Null, throwing an exception if it is not actually null. | |
| GREM_ALWAYS_INLINE bool | isBoolean () const noexcept |
| Check if this value is of type Boolean. | |
| GREM_ALWAYS_INLINE Boolean & | getBoolean () & |
| Get this value as a Boolean, throwing an exception if it is not actually a boolean. | |
| GREM_ALWAYS_INLINE const Boolean & | getBoolean () const & |
| Get this value as a Boolean, throwing an exception if it is not actually a boolean. | |
| GREM_ALWAYS_INLINE Boolean && | getBoolean () && |
| Get this value as a Boolean, throwing an exception if it is not actually a boolean. | |
| GREM_ALWAYS_INLINE const Boolean && | getBoolean () const && |
| Get this value as a Boolean, throwing an exception if it is not actually a boolean. | |
| GREM_ALWAYS_INLINE bool | isString () const noexcept |
| Check if this value is of type String. | |
| GREM_ALWAYS_INLINE const StringBase< Allocator > & | getString () const & |
| Get this value as a String, throwing an exception if it is not actually a string. | |
| GREM_ALWAYS_INLINE StringBase< Allocator > & | getString () & |
| Get this value as a String, throwing an exception if it is not actually a string. | |
| GREM_ALWAYS_INLINE StringBase< Allocator > && | getString () && |
| Get this value as a String, throwing an exception if it is not actually a string. | |
| GREM_ALWAYS_INLINE const StringBase< Allocator > && | getString () const && |
| Get this value as a String, throwing an exception if it is not actually a string. | |
| GREM_ALWAYS_INLINE bool | isNumber () const noexcept |
| Check if this value is of type Number. | |
| GREM_ALWAYS_INLINE Number & | getNumber () & |
| Get this value as a Number, throwing an exception if it is not actually a number. | |
| GREM_ALWAYS_INLINE const Number & | getNumber () const & |
| Get this value as a Number, throwing an exception if it is not actually a number. | |
| GREM_ALWAYS_INLINE Number && | getNumber () && |
| Get this value as a Number, throwing an exception if it is not actually a number. | |
| GREM_ALWAYS_INLINE const Number && | getNumber () const && |
| Get this value as a Number, throwing an exception if it is not actually a number. | |
| template<typename T> | |
| GREM_ALWAYS_INLINE T | getNumber () const |
| Get this value as a Number, throwing an exception if it is not actually a number, or not the correct kind of number. | |
| GREM_ALWAYS_INLINE bool | isObject () const noexcept |
| Check if this value is of type Object. | |
| GREM_ALWAYS_INLINE ObjectBase< Allocator > & | getObject () & |
| Get this value as an Object, throwing an exception if it is not actually an object. | |
| GREM_ALWAYS_INLINE const ObjectBase< Allocator > & | getObject () const & |
| Get this value as an Object, throwing an exception if it is not actually an object. | |
| GREM_ALWAYS_INLINE ObjectBase< Allocator > && | getObject () && |
| Get this value as an Object, throwing an exception if it is not actually an object. | |
| GREM_ALWAYS_INLINE const ObjectBase< Allocator > && | getObject () const && |
| Get this value as an Object, throwing an exception if it is not actually an object. | |
| GREM_ALWAYS_INLINE bool | isArray () const noexcept |
| Check if this value is of type Array. | |
| GREM_ALWAYS_INLINE size_t | getArraySize () const |
| Get the size of the Array in this value, throwing an exception if it is not actually an array. | |
| GREM_ALWAYS_INLINE ArrayBase< Allocator > & | getArray () & |
| Get this value as an Array, throwing an exception if it is not actually an array. | |
| GREM_ALWAYS_INLINE const ArrayBase< Allocator > & | getArray () const & |
| Get this value as an Array, throwing an exception if it is not actually an array. | |
| GREM_ALWAYS_INLINE ArrayBase< Allocator > && | getArray () && |
| Get this value as an Array, throwing an exception if it is not actually an array. | |
| GREM_ALWAYS_INLINE const ArrayBase< Allocator > && | getArray () const && |
| Get this value as an Array, throwing an exception if it is not actually an array. | |
| GREM_ALWAYS_INLINE bool | hasProperty (StringView key) const noexcept |
| Check if this value is of type Object and has a property with a given key. | |
| GREM_ALWAYS_INLINE ValueBase< Allocator > * | findProperty (StringView key) noexcept |
| Get a property of the Object in this value, returning nullptr if it is not actually an object or if the property doesn't exist. | |
| GREM_ALWAYS_INLINE const ValueBase< Allocator > * | findProperty (StringView key) const noexcept |
| Get a property of the Object in this value, returning nullptr if it is not actually an object or if the property doesn't exist. | |
| GREM_ALWAYS_INLINE ValueBase< Allocator > & | getProperty (StringView key) & |
| Get a property of the Object in this value, throwing an exception if it is not actually an object or if the property doesn't exist. | |
| GREM_ALWAYS_INLINE const ValueBase< Allocator > & | getProperty (StringView key) const & |
| Get a property of the Object in this value, throwing an exception if it is not actually an object or if the property doesn't exist. | |
| GREM_ALWAYS_INLINE ValueBase< Allocator > && | getProperty (StringView key) && |
| Get a property of the Object in this value, throwing an exception if it is not actually an object or if the property doesn't exist. | |
| GREM_ALWAYS_INLINE const ValueBase< Allocator > && | getProperty (StringView key) const && |
| Get a property of the Object in this value, throwing an exception if it is not actually an object or if the property doesn't exist. | |
| GREM_ALWAYS_INLINE bool | hasItem (size_t index) const noexcept |
| Check if this value is of type Array and has an item at the given index. | |
| GREM_ALWAYS_INLINE ValueBase< Allocator > * | findItem (size_t index) noexcept |
| Get an item of the Array in this value, returning nullptr if it is not actually an array or if the index is out of range. | |
| GREM_ALWAYS_INLINE const ValueBase< Allocator > * | findItem (size_t index) const noexcept |
| Get an item of the Array in this value, returning nullptr if it is not actually an array or if the index is out of range. | |
| GREM_ALWAYS_INLINE ValueBase< Allocator > & | getItem (size_t index) & |
| Get an item of the Array in this value, throwing an exception if it is not actually an array or if the index is out of range. | |
| GREM_ALWAYS_INLINE const ValueBase< Allocator > & | getItem (size_t index) const & |
| Get an item of the Array in this value, throwing an exception if it is not actually an array or if the index is out of range. | |
| GREM_ALWAYS_INLINE ValueBase< Allocator > && | getItem (size_t index) && |
| Get an item of the Array in this value, throwing an exception if it is not actually an array or if the index is out of range. | |
| GREM_ALWAYS_INLINE const ValueBase< Allocator > && | getItem (size_t index) const && |
| Get an item of the Array in this value, throwing an exception if it is not actually an array or if the index is out of range. | |
| GREM_ALWAYS_INLINE Null & | getNullProperty (StringView key) & |
| Get a property of the Object in this value as Null, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually null. | |
| GREM_ALWAYS_INLINE const Null & | getNullProperty (StringView key) const & |
| Get a property of the Object in this value as Null, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually null. | |
| GREM_ALWAYS_INLINE Null && | getNullProperty (StringView key) && |
| Get a property of the Object in this value as Null, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually null. | |
| GREM_ALWAYS_INLINE const Null & | getNullProperty (StringView key) const && |
| Get a property of the Object in this value as Null, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually null. | |
| GREM_ALWAYS_INLINE Null & | getNullItem (size_t index) & |
| Get an item of the Array in this value as Null, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually null. | |
| GREM_ALWAYS_INLINE const Null & | getNullItem (size_t index) const & |
| Get an item of the Array in this value as Null, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually null. | |
| GREM_ALWAYS_INLINE Null && | getNullItem (size_t index) && |
| Get an item of the Array in this value as Null, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually null. | |
| GREM_ALWAYS_INLINE const Null & | getNullItem (size_t index) const && |
| Get an item of the Array in this value as Null, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually null. | |
| GREM_ALWAYS_INLINE Boolean & | getBooleanProperty (StringView key) & |
| Get a property of the Object in this value as a Boolean, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a boolean. | |
| GREM_ALWAYS_INLINE const Boolean & | getBooleanProperty (StringView key) const & |
| Get a property of the Object in this value as a Boolean, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a boolean. | |
| GREM_ALWAYS_INLINE Boolean && | getBooleanProperty (StringView key) && |
| Get a property of the Object in this value as a Boolean, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a boolean. | |
| GREM_ALWAYS_INLINE const Boolean & | getBooleanProperty (StringView key) const && |
| Get a property of the Object in this value as a Boolean, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a boolean. | |
| GREM_ALWAYS_INLINE Boolean & | getBooleanItem (size_t index) & |
| Get an item of the Array in this value as a Boolean, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a boolean. | |
| GREM_ALWAYS_INLINE const Boolean & | getBooleanItem (size_t index) const & |
| Get an item of the Array in this value as a Boolean, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a boolean. | |
| GREM_ALWAYS_INLINE Boolean && | getBooleanItem (size_t index) && |
| Get an item of the Array in this value as a Boolean, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a boolean. | |
| GREM_ALWAYS_INLINE const Boolean & | getBooleanItem (size_t index) const && |
| Get an item of the Array in this value as a Boolean, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a boolean. | |
| GREM_ALWAYS_INLINE String & | getStringProperty (StringView key) & |
| Get a property of the Object in this value as a String, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a string. | |
| GREM_ALWAYS_INLINE const String & | getStringProperty (StringView key) const & |
| Get a property of the Object in this value as a String, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a string. | |
| GREM_ALWAYS_INLINE String && | getStringProperty (StringView key) && |
| Get a property of the Object in this value as a String, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a string. | |
| GREM_ALWAYS_INLINE const String & | getStringProperty (StringView key) const && |
| Get a property of the Object in this value as a String, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a string. | |
| GREM_ALWAYS_INLINE String & | getStringItem (size_t index) & |
| Get an item of the Array in this value as a String, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a string. | |
| GREM_ALWAYS_INLINE const String & | getStringItem (size_t index) const & |
| Get an item of the Array in this value as a String, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a string. | |
| GREM_ALWAYS_INLINE String && | getStringItem (size_t index) && |
| Get an item of the Array in this value as a String, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a string. | |
| GREM_ALWAYS_INLINE const String & | getStringItem (size_t index) const && |
| Get an item of the Array in this value as a String, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a string. | |
| GREM_ALWAYS_INLINE Number & | getNumberProperty (StringView key) & |
| Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number. | |
| GREM_ALWAYS_INLINE const Number & | getNumberProperty (StringView key) const & |
| Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number. | |
| GREM_ALWAYS_INLINE Number && | getNumberProperty (StringView key) && |
| Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number. | |
| GREM_ALWAYS_INLINE const Number & | getNumberProperty (StringView key) const && |
| Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number. | |
| template<typename T> | |
| GREM_ALWAYS_INLINE T | getNumberProperty (StringView key) const |
| Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number, or not the correct kind of number. | |
| GREM_ALWAYS_INLINE Number & | getNumberItem (size_t index) & |
| Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number. | |
| GREM_ALWAYS_INLINE const Number & | getNumberItem (size_t index) const & |
| Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number. | |
| GREM_ALWAYS_INLINE Number && | getNumberItem (size_t index) && |
| Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number. | |
| GREM_ALWAYS_INLINE const Number & | getNumberItem (size_t index) const && |
| Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number. | |
| template<typename T> | |
| GREM_ALWAYS_INLINE T | getNumberItem (size_t index) const |
| Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number, or not the correct kind of number. | |
| GREM_ALWAYS_INLINE Object & | getObjectProperty (StringView key) & |
| Get a property of the Object in this value as an Object, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an object. | |
| GREM_ALWAYS_INLINE const Object & | getObjectProperty (StringView key) const & |
| Get a property of the Object in this value as an Object, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an object. | |
| GREM_ALWAYS_INLINE Object && | getObjectProperty (StringView key) && |
| Get a property of the Object in this value as an Object, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an object. | |
| GREM_ALWAYS_INLINE const Object & | getObjectProperty (StringView key) const && |
| Get a property of the Object in this value as an Object, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an object. | |
| GREM_ALWAYS_INLINE Object & | getObjectItem (size_t index) & |
| Get an item of the Array in this value as an Object, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an object. | |
| GREM_ALWAYS_INLINE const Object & | getObjectItem (size_t index) const & |
| Get an item of the Array in this value as an Object, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an object. | |
| GREM_ALWAYS_INLINE Object && | getObjectItem (size_t index) && |
| Get an item of the Array in this value as an Object, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an object. | |
| GREM_ALWAYS_INLINE const Object & | getObjectItem (size_t index) const && |
| Get an item of the Array in this value as an Object, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an object. | |
| GREM_ALWAYS_INLINE Array & | getArrayProperty (StringView key) & |
| Get a property of the Object in this value as an Array, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an array. | |
| GREM_ALWAYS_INLINE const Array & | getArrayProperty (StringView key) const & |
| Get a property of the Object in this value as an Array, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an array. | |
| GREM_ALWAYS_INLINE Array && | getArrayProperty (StringView key) && |
| Get a property of the Object in this value as an Array, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an array. | |
| GREM_ALWAYS_INLINE const Array & | getArrayProperty (StringView key) const && |
| Get a property of the Object in this value as an Array, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an array. | |
| GREM_ALWAYS_INLINE Array & | getArrayItem (size_t index) & |
| Get an item of the Array in this value as an Array, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an array. | |
| GREM_ALWAYS_INLINE const Array & | getArrayItem (size_t index) const & |
| Get an item of the Array in this value as an Array, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an array. | |
| GREM_ALWAYS_INLINE Array && | getArrayItem (size_t index) && |
| Get an item of the Array in this value as an Array, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an array. | |
| GREM_ALWAYS_INLINE const Array & | getArrayItem (size_t index) const && |
| Get an item of the Array in this value as an Array, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an array. | |
| GREM_ALWAYS_INLINE SourceLocation | getSource () const noexcept |
| Get the source location of this value. | |
| GREM_ALWAYS_INLINE bool | operator== (const ValueBase &other) const |
| Compare this value to another for equality. | |
| Public Member Functions inherited from grem::json::VariantBase< Allocator > | |
| VariantBase () noexcept | |
| Construct a Null value. | |
| VariantBase (const allocator_type &allocator) noexcept | |
| Construct a Null value. | |
| VariantBase (Null, const allocator_type &allocator) noexcept | |
| Construct a Null value. | |
| VariantBase (Null) noexcept | |
| Construct a Null value. | |
| VariantBase (std::nullptr_t, const allocator_type &allocator) noexcept | |
| Construct a Null value. | |
| VariantBase (std::nullptr_t) noexcept | |
| Construct a Null value. | |
| VariantBase (Boolean value, const allocator_type &allocator) noexcept | |
| Construct a Boolean value with the given underlying value. | |
| VariantBase (Boolean value) noexcept | |
| Construct a Boolean value with the given underlying value. | |
| VariantBase (const StringBase< Allocator > &value, const allocator_type &allocator) | |
| Construct a String value with the given underlying value. | |
| VariantBase (const StringBase< Allocator > &value) | |
| Construct a String value with the given underlying value. | |
| VariantBase (StringBase< Allocator > &&value, const allocator_type &allocator) noexcept | |
| Construct a String value from the given underlying value. | |
| VariantBase (StringBase< Allocator > &&value) noexcept | |
| Construct a String value from the given underlying value. | |
| VariantBase (const char *value, const allocator_type &allocator) | |
| Construct a String value with the given underlying value. | |
| VariantBase (const char *value) | |
| Construct a String value with the given underlying value. | |
| VariantBase (StringView value, const allocator_type &allocator) | |
| Construct a String value with the given underlying value. | |
| VariantBase (StringView value) | |
| Construct a String value with the given underlying value. | |
| VariantBase (CStringView value, const allocator_type &allocator) | |
| Construct a String value with the given underlying value. | |
| VariantBase (CStringView value) | |
| Construct a String value with the given underlying value. | |
| VariantBase (const char8_t *value, const allocator_type &allocator) | |
| Construct a String value with the given underlying value. | |
| VariantBase (const char8_t *value) | |
| Construct a String value with the given underlying value. | |
| VariantBase (UTF8StringView value, const allocator_type &allocator) | |
| Construct a String value with the given underlying value. | |
| VariantBase (UTF8StringView value) | |
| Construct a String value with the given underlying value. | |
| VariantBase (UTF8CStringView value, const allocator_type &allocator) | |
| Construct a String value with the given underlying value. | |
| VariantBase (UTF8CStringView value) | |
| Construct a String value with the given underlying value. | |
| VariantBase (strict_arithmetic auto value, const allocator_type &allocator) noexcept | |
| Construct a Number value with the given underlying value. | |
| VariantBase (strict_arithmetic auto value) noexcept | |
| Construct a Number value with the given underlying value. | |
| VariantBase (const ObjectBase< Allocator > &value, const allocator_type &allocator) | |
| Construct an Object value with the given underlying value. | |
| VariantBase (const ObjectBase< Allocator > &value) | |
| Construct an Object value with the given underlying value. | |
| VariantBase (ObjectBase< Allocator > &&value, const allocator_type &allocator) noexcept | |
| Construct an Object value from the given underlying value. | |
| VariantBase (ObjectBase< Allocator > &&value) noexcept | |
| Construct an Object value from the given underlying value. | |
| VariantBase (const ArrayBase< Allocator > &value, const allocator_type &allocator) | |
| Construct an Array value with the given underlying value. | |
| VariantBase (const ArrayBase< Allocator > &value) | |
| Construct an Array value with the given underlying value. | |
| VariantBase (ArrayBase< Allocator > &&value, const allocator_type &allocator) noexcept | |
| Construct an Array value from the given underlying value. | |
| VariantBase (ArrayBase< Allocator > &&value) noexcept | |
| Construct an Array value from the given underlying value. | |
| ~VariantBase ()=default | |
| Destructor. | |
| VariantBase (const VariantBase &other, const allocator_type &allocator) noexcept | |
| Copy constructor. | |
| VariantBase (const VariantBase &other) | |
| Copy constructor. | |
| VariantBase (VariantBase &&other, const allocator_type &allocator) noexcept | |
| Move constructor. | |
| VariantBase (VariantBase &&other) noexcept | |
| Move constructor. | |
| VariantBase & | operator= (const VariantBase &other) |
| Copy assignment. | |
| VariantBase & | operator= (VariantBase &&other) noexcept(std::allocator_traits< allocator_type >::propagate_on_container_move_assignment::value||//NOLINT(cppcoreguidelines-noexcept-move-operations, performance-noexcept-move-constructor) std::allocator_traits< allocator_type >::is_always_equal::value) |
| Move assignment. | |
| allocator_type | get_allocator () const noexcept |
| Get the allocator used by the value. | |
| StringBase< Allocator > | toString (const SerializationOptions &options={}, const allocator_type &stringAllocator=allocator_type()) const |
| Get a JSON string representation of the value. | |
| GREM_ALWAYS_INLINE bool | operator== (const VariantBase &other) const |
| Compare this value to another for equality. | |
| GREM_ALWAYS_INLINE std::partial_ordering | operator<=> (const VariantBase &other) const |
| Compare this value to another. | |
| Public Member Functions inherited from grem::Variant< Null, Boolean, StringBase< Allocator >, Number, ObjectBase< Allocator >, ArrayBase< Allocator > > | |
| constexpr | Variant () noexcept(std::is_nothrow_default_constructible_v< variant_alternative_t< 0, Variant > >) |
| Default-construct a variant with the first variant alternative, if it is default-constructible. | |
| constexpr | Variant (U &&value) noexcept(std::is_nothrow_constructible_v< decltype(F(std::forward< U >(value))), U >) |
| Converting constructor. | |
| constexpr | Variant (std::in_place_type_t< T > type, Args &&... args) |
| Construct a variant alternative in-place given its type. | |
| constexpr | Variant (std::in_place_type_t< T > type, std::initializer_list< U > ilist, Args &&... args) |
| Construct a variant alternative in-place given its type, with an initializer list as the first constructor argument. | |
| constexpr | Variant (std::in_place_index_t< Index > index, Args &&... args) |
| Construct a variant alternative in-place given its index. | |
| constexpr | Variant (std::in_place_index_t< Index > index, std::initializer_list< U > ilist, Args &&... args) |
| Construct a variant alternative in-place given its index, with an initializer list as the first constructor argument. | |
| constexpr | ~Variant () |
| Destructor. | |
| constexpr | ~Variant ()=default |
| Trivial destructor. | |
| constexpr | Variant (const Variant &other)=delete |
| Deleted copy constructor. | |
| constexpr | Variant (const Variant &other)=default |
| Trivial copy constructor. | |
| constexpr | Variant (const Variant &other) |
| Copy constructor. | |
| constexpr | Variant (Variant &&other) noexcept=default |
| Trivial move constructor. | |
| constexpr | Variant (Variant &&other) noexcept((std::is_nothrow_move_constructible_v< Ts > &&...)) |
| Move constructor. | |
| constexpr Variant & | operator= (const Variant &other)=delete |
| Deleted copy assignment. | |
| constexpr Variant & | operator= (const Variant &other)=default |
| Trivial copy assignment. | |
| constexpr Variant & | operator= (const Variant &other) |
| Copy assignment. | |
| constexpr Variant & | operator= (Variant &&other) noexcept=default |
| Trivial move assignment. | |
| constexpr Variant & | operator= (Variant &&other) noexcept(((std::is_nothrow_move_constructible_v< Ts > &&//NOLINT(performance-noexcept-move-constructor, cppcoreguidelines-noexcept-move-operations) std::is_nothrow_move_assignable_v< Ts >) &&...)) |
| Move assignment. | |
| constexpr Variant & | operator= (U &&value) noexcept(std::is_nothrow_assignable_v< decltype(F(std::forward< U >(value)))&, U > &&std::is_nothrow_constructible_v< decltype(F(std::forward< U >(value))), U >) |
| Converting assignment. | |
| constexpr T & | emplace (Args &&... args) |
| Construct an alternative given its type, destroying the old value. | |
| constexpr T & | emplace (std::initializer_list< U > ilist, Args &&... args) |
| Construct an alternative given its type, with an initializer list as the first constructor argument, destroying the old value. | |
| constexpr auto & | emplace (Args &&... args) |
| Construct an alternative given its index, destroying the old value. | |
| constexpr auto & | emplace (std::initializer_list< U > ilist, Args &&... args) |
| Construct an alternative given its index, with an initializer list as the first constructor argument, destroying the old value. | |
| constexpr void | swap (Variant &other) noexcept(((std::is_nothrow_move_constructible_v< Ts > &&std::is_nothrow_swappable_v< Ts >) &&...)) |
| Swap this variant's value with that of another. | |
| constexpr index_type | index () const noexcept |
| Get the alternative index of the currently active value held by the variant. | |
| constexpr bool | valueless_by_exception () const noexcept |
| Check if the variant is in the valueless by exception state. | |
| constexpr bool | is () const noexcept |
| Check if the variant currently holds the alternative with the given type. | |
| constexpr bool | is () const noexcept |
| Check if the variant currently holds the alternative with the given index. | |
| constexpr T & | as () &noexcept |
| Access the underlying value with the given type without a safety check. | |
| constexpr const T & | as () const &noexcept |
| Access the underlying value with the given type without a safety check. | |
| constexpr T && | as () &&noexcept |
| Access the underlying value with the given type without a safety check. | |
| constexpr const T && | as () const &&noexcept |
| Access the underlying value with the given type without a safety check. | |
| constexpr auto & | as () &noexcept |
| Access the underlying value with the given index without a safety check. | |
| constexpr const auto & | as () const &noexcept |
| Access the underlying value with the given index without a safety check. | |
| constexpr auto && | as () &&noexcept |
| Access the underlying value with the given index without a safety check. | |
| constexpr const auto && | as () const &&noexcept |
| Access the underlying value with the given index without a safety check. | |
| constexpr T & | get () & |
| Access the underlying value with the given type. | |
| constexpr const T & | get () const & |
| Access the underlying value with the given type. | |
| constexpr T && | get () && |
| Access the underlying value with the given type. | |
| constexpr const T && | get () const && |
| Access the underlying value with the given type. | |
| constexpr auto & | get () & |
| Access the underlying value with the given index. | |
| constexpr const auto & | get () const & |
| Access the underlying value with the given index. | |
| constexpr auto && | get () && |
| Access the underlying value with the given index. | |
| constexpr const auto && | get () const && |
| Access the underlying value with the given index. | |
| constexpr T * | get_if () noexcept |
| Access the underlying value with the given type if it is the currently active alternative. | |
| constexpr const T * | get_if () const noexcept |
| Access the underlying value with the given type if it is the currently active alternative. | |
| constexpr auto * | get_if () noexcept |
| Access the underlying value with the given index if it is the currently active alternative. | |
| constexpr const auto * | get_if () const noexcept |
| Access the underlying value with the given index if it is the currently active alternative. | |
Static Public Member Functions | |
| static ValueBase | parse (UTF8StringView jsonString, const SourceLocation &source={}, const allocator_type &allocator=allocator_type()) |
| Parse a value of any JSON type from a UTF-8 JSON string. | |
| static ValueBase | parse (StringView jsonString, const SourceLocation &source={}, const allocator_type &allocator=allocator_type()) |
| Parse a value of any JSON type from a JSON string interpreted as UTF-8. | |
| Static Public Member Functions inherited from grem::json::VariantBase< Allocator > | |
| static ValueBase< Allocator > | parse (UTF8StringView jsonString, const SourceLocation &source={}, const allocator_type &allocator=allocator_type()) |
| Parse a value of any JSON type from a UTF-8 JSON string. | |
| static ValueBase< Allocator > | parse (StringView jsonString, const SourceLocation &source={}, const allocator_type &allocator=allocator_type()) |
| Parse a value of any JSON type from a JSON string interpreted as UTF-8. | |
| Static Public Member Functions inherited from grem::Variant< Null, Boolean, StringBase< Allocator >, Number, ObjectBase< Allocator >, ArrayBase< Allocator > > | |
| static constexpr decltype(auto) | visit (Visitor &&visitor, V &&variant) |
| Call a visitor functor with the currently active underlying value of a variant. | |
| static constexpr decltype(auto) | visitIndex (index_type index, Visitor &&visitor) |
| Call a visitor functor with the type corresponding to a variant index. | |
| static constexpr decltype(auto) | apply (Function &&function) |
| Call a functor with all alternative types. | |
Additional Inherited Members | |
| Public Types inherited from grem::json::VariantBase< Allocator > | |
| using | allocator_type = Allocator<VariantBase> |
| Allocator type used by the value. | |
| Public Types inherited from grem::Variant< Null, Boolean, StringBase< Allocator >, Number, ObjectBase< Allocator >, ArrayBase< Allocator > > | |
| using | index_type |
| Index type used to encode the active alternative type. | |
| Static Public Attributes inherited from grem::Variant< Null, Boolean, StringBase< Allocator >, Number, ObjectBase< Allocator >, ArrayBase< Allocator > > | |
| static constexpr index_type | npos |
| Invalid alternative index, representing the valueless by exception state. | |
JSON value with an associated SourceLocation.
| Allocator | allocator type template to use. |
|
inline |
Construct a JSON value.
| value | value to construct this value from. |
| allocator | allocator to use. |
|
inline |
Construct a JSON value.
| value | value to construct this value from. |
|
inline |
Construct a JSON value with an associated source location.
| value | value to construct this value from. |
| source | source location of the value. |
|
inline |
Construct a JSON value with an associated source location.
| value | value to construct this value from. |
| source | source location of the value. |
| allocator | allocator to use. |
|
default |
Destructor.
|
inlinenoexcept |
Copy constructor.
|
default |
Copy constructor.
|
inlinenoexcept |
Move constructor.
|
defaultnoexcept |
Move constructor.
|
inlinestaticnodiscard |
Parse a value of any JSON type from a UTF-8 JSON string.
The parser supports JSON5 features such as comments, unquoted identifiers and trailing commas.
| jsonString | read-only view over the JSON string to parse a value from. |
| source | source location corresponding to the start of the given JSON string. |
| allocator | allocator to use. |
| json::Error | on failure to parse a JSON value. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
|
inlinestaticnodiscard |
Parse a value of any JSON type from a JSON string interpreted as UTF-8.
The parser supports JSON5 features such as comments, unquoted identifiers and trailing commas.
| jsonString | read-only view over the JSON string to parse a value from. |
| source | source location corresponding to the start of the given JSON string. |
| allocator | allocator to use. |
| json::Error | on failure to parse a JSON value. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
|
default |
Copy assignment.
|
defaultnoexcept |
Move assignment.
|
inlinenodiscardnoexcept |
Check if this value is of type Null.
|
inlinenodiscard |
Get this value as Null, throwing an exception if it is not actually null.
| json::Error | if this value is not null. |
|
inlinenodiscard |
Get this value as Null, throwing an exception if it is not actually null.
| json::Error | if this value is not null. |
|
inlinenodiscard |
Get this value as Null, throwing an exception if it is not actually null.
| json::Error | if this value is not null. |
|
inlinenodiscard |
Get this value as Null, throwing an exception if it is not actually null.
| json::Error | if this value is not null. |
|
inlinenodiscardnoexcept |
Check if this value is of type Boolean.
|
inlinenodiscard |
Get this value as a Boolean, throwing an exception if it is not actually a boolean.
| json::Error | if this value is not a boolean. |
|
inlinenodiscard |
Get this value as a Boolean, throwing an exception if it is not actually a boolean.
| json::Error | if this value is not a boolean. |
|
inlinenodiscard |
Get this value as a Boolean, throwing an exception if it is not actually a boolean.
| json::Error | if this value is not a boolean. |
|
inlinenodiscard |
Get this value as a Boolean, throwing an exception if it is not actually a boolean.
| json::Error | if this value is not a boolean. |
|
inlinenodiscardnoexcept |
Check if this value is of type String.
|
inlinenodiscard |
Get this value as a String, throwing an exception if it is not actually a string.
| json::Error | if this value is not a string. |
|
inlinenodiscard |
Get this value as a String, throwing an exception if it is not actually a string.
| json::Error | if this value is not a string. |
|
inlinenodiscard |
Get this value as a String, throwing an exception if it is not actually a string.
| json::Error | if this value is not a string. |
|
inlinenodiscard |
Get this value as a String, throwing an exception if it is not actually a string.
| json::Error | if this value is not a string. |
|
inlinenodiscardnoexcept |
Check if this value is of type Number.
|
inlinenodiscard |
Get this value as a Number, throwing an exception if it is not actually a number.
| json::Error | if this value is not a number. |
|
inlinenodiscard |
Get this value as a Number, throwing an exception if it is not actually a number.
| json::Error | if this value is not a number. |
|
inlinenodiscard |
Get this value as a Number, throwing an exception if it is not actually a number.
| json::Error | if this value is not a number. |
|
inlinenodiscard |
Get this value as a Number, throwing an exception if it is not actually a number.
| json::Error | if this value is not a number. |
|
inlinenodiscard |
Get this value as a Number, throwing an exception if it is not actually a number, or not the correct kind of number.
| T | number type to get. |
| json::Error | if this value is not a valid number of the given type. |
|
inlinenodiscardnoexcept |
Check if this value is of type Object.
|
inlinenodiscard |
Get this value as an Object, throwing an exception if it is not actually an object.
| json::Error | if this value is not an object. |
|
inlinenodiscard |
Get this value as an Object, throwing an exception if it is not actually an object.
| json::Error | if this value is not an object. |
|
inlinenodiscard |
Get this value as an Object, throwing an exception if it is not actually an object.
| json::Error | if this value is not an object. |
|
inlinenodiscard |
Get this value as an Object, throwing an exception if it is not actually an object.
| json::Error | if this value is not an object. |
|
inlinenodiscardnoexcept |
Check if this value is of type Array.
|
inlinenodiscard |
Get the size of the Array in this value, throwing an exception if it is not actually an array.
| json::Error | if this value is not an array. |
|
inlinenodiscard |
Get this value as an Array, throwing an exception if it is not actually an array.
| json::Error | if this value is not an array. |
|
inlinenodiscard |
Get this value as an Array, throwing an exception if it is not actually an array.
| json::Error | if this value is not an array. |
|
inlinenodiscard |
Get this value as an Array, throwing an exception if it is not actually an array.
| json::Error | if this value is not an array. |
|
inlinenodiscard |
Get this value as an Array, throwing an exception if it is not actually an array.
| json::Error | if this value is not an array. |
|
inlinenodiscardnoexcept |
Check if this value is of type Object and has a property with a given key.
| key | key of the property to check for. |
|
inlinenodiscardnoexcept |
Get a property of the Object in this value, returning nullptr if it is not actually an object or if the property doesn't exist.
| key | key of the property to get. |
|
inlinenodiscardnoexcept |
Get a property of the Object in this value, returning nullptr if it is not actually an object or if the property doesn't exist.
| key | key of the property to get. |
|
inlinenodiscard |
Get a property of the Object in this value, throwing an exception if it is not actually an object or if the property doesn't exist.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist. |
|
inlinenodiscard |
Get a property of the Object in this value, throwing an exception if it is not actually an object or if the property doesn't exist.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist. |
|
inlinenodiscard |
Get a property of the Object in this value, throwing an exception if it is not actually an object or if the property doesn't exist.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist. |
|
inlinenodiscard |
Get a property of the Object in this value, throwing an exception if it is not actually an object or if the property doesn't exist.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist. |
|
inlinenodiscardnoexcept |
Check if this value is of type Array and has an item at the given index.
| index | array index of the item to check for. |
|
inlinenodiscardnoexcept |
Get an item of the Array in this value, returning nullptr if it is not actually an array or if the index is out of range.
| index | array index of the item to get. |
|
inlinenodiscardnoexcept |
Get an item of the Array in this value, returning nullptr if it is not actually an array or if the index is out of range.
| index | array index of the item to get. |
|
inlinenodiscard |
Get an item of the Array in this value, throwing an exception if it is not actually an array or if the index is out of range.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range. |
|
inlinenodiscard |
Get an item of the Array in this value, throwing an exception if it is not actually an array or if the index is out of range.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range. |
|
inlinenodiscard |
Get an item of the Array in this value, throwing an exception if it is not actually an array or if the index is out of range.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range. |
|
inlinenodiscard |
Get an item of the Array in this value, throwing an exception if it is not actually an array or if the index is out of range.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range. |
|
inlinenodiscard |
Get a property of the Object in this value as Null, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually null.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not null. |
|
inlinenodiscard |
Get a property of the Object in this value as Null, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually null.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not null. |
|
inlinenodiscard |
Get a property of the Object in this value as Null, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually null.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not null. |
|
inlinenodiscard |
Get a property of the Object in this value as Null, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually null.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not null. |
|
inlinenodiscard |
Get an item of the Array in this value as Null, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually null.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not null. |
|
inlinenodiscard |
Get an item of the Array in this value as Null, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually null.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not null. |
|
inlinenodiscard |
Get an item of the Array in this value as Null, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually null.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not null. |
|
inlinenodiscard |
Get an item of the Array in this value as Null, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually null.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not null. |
|
inlinenodiscard |
Get a property of the Object in this value as a Boolean, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a boolean.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a boolean. |
|
inlinenodiscard |
Get a property of the Object in this value as a Boolean, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a boolean.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a boolean. |
|
inlinenodiscard |
Get a property of the Object in this value as a Boolean, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a boolean.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a boolean. |
|
inlinenodiscard |
Get a property of the Object in this value as a Boolean, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a boolean.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a boolean. |
|
inlinenodiscard |
Get an item of the Array in this value as a Boolean, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a boolean.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a boolean. |
|
inlinenodiscard |
Get an item of the Array in this value as a Boolean, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a boolean.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a boolean. |
|
inlinenodiscard |
Get an item of the Array in this value as a Boolean, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a boolean.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a boolean. |
|
inlinenodiscard |
Get an item of the Array in this value as a Boolean, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a boolean.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a boolean. |
|
inlinenodiscard |
Get a property of the Object in this value as a String, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a string.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a string. |
|
inlinenodiscard |
Get a property of the Object in this value as a String, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a string.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a string. |
|
inlinenodiscard |
Get a property of the Object in this value as a String, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a string.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a string. |
|
inlinenodiscard |
Get a property of the Object in this value as a String, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a string.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a string. |
|
inlinenodiscard |
Get an item of the Array in this value as a String, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a string.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a string. |
|
inlinenodiscard |
Get an item of the Array in this value as a String, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a string.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a string. |
|
inlinenodiscard |
Get an item of the Array in this value as a String, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a string.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a string. |
|
inlinenodiscard |
Get an item of the Array in this value as a String, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a string.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a string. |
|
inlinenodiscard |
Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a number. |
|
inlinenodiscard |
Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a number. |
|
inlinenodiscard |
Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a number. |
|
inlinenodiscard |
Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a number. |
|
inlinenodiscard |
Get a property of the Object in this value as a Number, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually a number, or not the correct kind of number.
| T | number type to get. |
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not a number of the given type. |
|
inlinenodiscard |
Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a number. |
|
inlinenodiscard |
Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a number. |
|
inlinenodiscard |
Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a number. |
|
inlinenodiscard |
Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a number. |
|
inlinenodiscard |
Get an item of the Array in this value as a Number, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually a number, or not the correct kind of number.
| T | number type to get. |
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not a number of the given type. |
|
inlinenodiscard |
Get a property of the Object in this value as an Object, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an object.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not an object. |
|
inlinenodiscard |
Get a property of the Object in this value as an Object, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an object.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not an object. |
|
inlinenodiscard |
Get a property of the Object in this value as an Object, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an object.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not an object. |
|
inlinenodiscard |
Get a property of the Object in this value as an Object, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an object.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not an object. |
|
inlinenodiscard |
Get an item of the Array in this value as an Object, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an object.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not an object. |
|
inlinenodiscard |
Get an item of the Array in this value as an Object, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an object.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not an object. |
|
inlinenodiscard |
Get an item of the Array in this value as an Object, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an object.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not an object. |
|
inlinenodiscard |
Get an item of the Array in this value as an Object, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an object.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not an object. |
|
inlinenodiscard |
Get a property of the Object in this value as an Array, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an array.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not an array. |
|
inlinenodiscard |
Get a property of the Object in this value as an Array, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an array.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not an array. |
|
inlinenodiscard |
Get a property of the Object in this value as an Array, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an array.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not an array. |
|
inlinenodiscard |
Get a property of the Object in this value as an Array, throwing an exception if this value is not actually an object, if the property doesn't exist, or if the property is not actually an array.
| key | key of the property to get. |
| json::Error | if this value is not an object, or if the specified property doesn't exist, or if the specified property is not an array. |
|
inlinenodiscard |
Get an item of the Array in this value as an Array, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an array.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not an array. |
|
inlinenodiscard |
Get an item of the Array in this value as an Array, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an array.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not an array. |
|
inlinenodiscard |
Get an item of the Array in this value as an Array, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an array.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not an array. |
|
inlinenodiscard |
Get an item of the Array in this value as an Array, throwing an exception if this value is not actually an array, if the index is out of range, or if the item is not actually an array.
| index | array index of the item to get. |
| json::Error | if this value is not an array, or if the specified index is out of range, or if the specified item is not an array. |
|
inlinenodiscardnoexcept |
Get the source location of this value.
|
inlinenodiscard |
Compare this value to another for equality.
| other | the value to compare this value to. |