|
Devel Lib
|
Represents a JSON boolean data type for serialization and deserialization. More...
#include <JsonSerializableBool.h>


Public Member Functions | |
| IJsonBool (const CJsonFieldName i_oFieldName) | |
Constructs an IJsonBool object with the specified JSON field name. More... | |
| IJsonBool & | operator= (const bool &i_tValue) |
Assignment operator for assigning a boolean value to the IJsonBool object. More... | |
| IJsonBool & | operator= (bool &&i_tValue) |
Move assignment operator for assigning a boolean value to the IJsonBool object. More... | |
Public Member Functions inherited from Devel::Serializing::IJsonType< bool, Serializing::IBool<> > | |
| bool | doDeserialize (IO::CJsonObject &i_oObject, const bool i_bIsStrict=false) |
| Deserializes the object from a JSON object. More... | |
| bool | doSerialize (IO::CJsonObject &i_oObject, const bool i_bIsStrict=false) const |
| Serializes the object to a JSON object. More... | |
| size_t | size () const override |
| Retrieves the size of the object. More... | |
| IJsonType & | operator= (const TJsonFieldName &i_tValue) |
| Assigns a JSON field name to the object. More... | |
| IJsonType & | operator= (TJsonFieldName &&i_tValue) |
| Assigns a JSON field name to the object (move assignment). More... | |
Public Member Functions inherited from Devel::Serializing::IBool< IsHidden, T > | |
| CreateSerializeOperators (T, IsHidden) | |
Public Member Functions inherited from Devel::Serializing::IData< bool, false > | |
| virtual | ~IData ()=default |
| Default destructor. | |
| bool | doSerialize (IO::CWriteStream &i_oStream) const |
| Serializes the data to a write stream. More... | |
| bool | doDeserialize (IO::CReadStream &i_oStream) |
| Deserializes the data from a read stream. More... | |
| bool | doDeserialize (const char *i_szString) |
| Deserializes the data from a string. More... | |
| bool | doDeserialize (std::vector< std::string >::const_iterator &i_oIt, const std::vector< std::string >::const_iterator &i_oItEnd) |
| Deserializes the data from a range of strings. More... | |
| virtual bool | isHidden () const |
| Returns whether the field is hidden. More... | |
| virtual SCompareData | compareData () const |
| Returns the compare data for the data field. More... | |
| auto | begin () const |
| Returns an iterator pointing to the beginning of the value. More... | |
| auto | end () const |
| Returns an iterator pointing to the end of the value. More... | |
| auto & | operator[] (const size_t i_nIndex) |
| Returns a reference to the value at the specified index. More... | |
| const auto & | operator[] (const size_t i_nIndex) const |
| Returns a const reference to the value at the specified index. More... | |
| SerializerEnableIfNotArithmetic (IData< bool > &) operator--() | |
| Pre-decrement operator. More... | |
| SerializerEnableIfNotArithmetic (IData< bool > &) operator--(int) | |
| Post-decrement operator. More... | |
| SerializerEnableIfNotArithmetic (IData< bool > &) operator++() | |
| Pre-increment operator. More... | |
| SerializerEnableIfNotArithmetic (IData< bool > &) operator++(int) | |
| Post-increment operator. More... | |
Public Member Functions inherited from Devel::Serializing::IValue< T > | |
| template<typename ... TArgs, std::enable_if_t< std::is_constructible_v< T, TArgs... >> * = nullptr> | |
| IValue (TArgs... i_tArgs) | |
Constructs an IValue object with the specified arguments. More... | |
| const T & | value () const |
| Returns the value. More... | |
| T & | value () |
| Returns a reference to the value. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Devel::Serializing::IJsonType< bool, Serializing::IBool<> > | |
| IJsonType (const CJsonFieldName i_oFieldName) | |
Constructs an IJsonType object with the specified JSON field name. More... | |
| virtual | ~IJsonType ()=default |
| Destructor. | |
| bool | serialize (IO::CJsonObject &i_oObject, const bool i_bIsStrict=false) const |
| Serializes the data to a JSON object. More... | |
| std::string_view | name () const |
| Retrieves the name of the JSON field. More... | |
| bool | isNull () const |
| Checks if the JSON field is null. More... | |
| void | setNull (bool i_bState) |
| Sets the null state of the JSON field. More... | |
| IO::CJsonObject * | getObject (IO::CJsonObject &i_oObject, const bool i_bIsStrict) |
| Retrieves the JSON object for the specified JSON field. More... | |
| bool | checkSerializeObject (IO::CJsonObject &i_oObject, const bool i_bIsStrict) const |
| Checks if serialization of the object is allowed and handles null fields. More... | |
Protected Attributes inherited from Devel::Serializing::IValue< T > | |
| T | m_tValue |
| The value. | |
Represents a JSON boolean data type for serialization and deserialization.
The IJsonBool class is a specialization of IJsonType for handling boolean values in JSON objects. It provides functionality for deserializing a JSON boolean value into a boolean variable, as well as serializing a boolean variable into a JSON boolean value.
|
inline |
Constructs an IJsonBool object with the specified JSON field name.
| i_oFieldName | The JSON field name. |
|
inline |
|
inline |