3 #include "Serializing/Core/Types/SerializableBool.h"
4 #include "Serializing/Json/JsonSerializableType.h"
27 bool onDeserialize(
IO::CJsonObject &i_oObject,
const bool i_bIsStrict)
final {
33 throw DifferentTypesException;
37 pObject->at(0) <
'1' ||
38 pObject->at(0) ==
'f' ||
39 pObject->at(0) ==
'F')
49 bool onSerialize(IO::CJsonObject &i_oObject,
const bool i_bIsStrict)
const final {
50 return this->
serialize(i_oObject, i_bIsStrict);
56 bool onDeserialize(IO::CJsonObject &i_oObject)
final {
57 return this->onDeserialize(i_oObject,
false);
63 bool onSerialize(IO::CJsonObject &i_oObject)
const final {
64 return this->onSerialize(i_oObject,
false);
68 using IJsonType<bool, Serializing::IBool<>>
::IJsonType;
84 this->
m_tValue = std::move(i_tValue);
A class that encapsulates a JSON object.
Definition: JsonObject.h:50
EJsonType type() const
Returns the type of the JSON object.
Definition: JsonObject.h:123
A class representing a JSON field name.
Definition: JsonFieldName.h:49
A class representing a boolean value for serialization.
Definition: SerializableBool.h:17
Represents a JSON boolean data type for serialization and deserialization.
Definition: JsonSerializableBool.h:16
IJsonBool & operator=(const bool &i_tValue)
Assignment operator for assigning a boolean value to the IJsonBool object.
Definition: JsonSerializableBool.h:73
IJsonBool & operator=(bool &&i_tValue)
Move assignment operator for assigning a boolean value to the IJsonBool object.
Definition: JsonSerializableBool.h:82
IJsonBool(const CJsonFieldName i_oFieldName)
Constructs an IJsonBool object with the specified JSON field name.
Definition: JsonSerializableBool.h:20
Represents a JSON data type with serialization and deserialization functionality.
Definition: JsonSerializableType.h:84
IO::CJsonObject * getObject(IO::CJsonObject &i_oObject, const bool i_bIsStrict)
Retrieves the JSON object for the specified JSON field.
Definition: JsonSerializableType.h:177
bool serialize(IO::CJsonObject &i_oObject, const bool i_bIsStrict=false) const
Serializes the data to a JSON object.
Definition: JsonSerializableType.h:142
void setNull(bool i_bState)
Sets the null state of the JSON field.
Definition: JsonSerializableType.h:169
IJsonType(const CJsonFieldName i_oFieldName)
Constructs an IJsonType object with the specified JSON field name.
Definition: JsonSerializableType.h:88
T m_tValue
The value.
Definition: SerializableData.h:78
@ JTBoolean
A boolean type.
The namespace encapsulating serializing related functionality in the Devel framework.