JSON primitive types mapper. More...
#include <primitiveMapper.hpp>
Public Member Functions | |
PrimitiveMapper (const PrimitiveMapper &other)=delete | |
PrimitiveMapper (PrimitiveMapper &&other)=delete | |
void | serializeValue (const T &value, anch::json::WriterContext &context) const |
bool | deserializeValue (T &value, anch::json::ReaderContext &context) const |
Public Member Functions inherited from anch::json::GenericMapper< PrimitiveMapper< T >, T > | |
void | serialize (const T &value, anch::json::WriterContext &context) const |
bool | deserialize (T &value, anch::json::ReaderContext &context) const |
Additional Inherited Members | |
Protected Member Functions inherited from anch::json::GenericMapper< PrimitiveMapper< T >, T > | |
GenericMapper () | |
virtual | ~GenericMapper () |
JSON primitive types mapper.
JSON primitive types does not have any fields.
T | the object type |
|
delete |
Forbids PrimitiveMapper copy constructor
other | the other mapper not to copy |
|
delete |
Forbids PrimitiveMapper move constructor
other | the other mapper not to move |
bool anch::json::PrimitiveMapper< T >::deserializeValue | ( | T & | value, |
anch::json::ReaderContext & | context ) const |
Deserialize JSON value
value | the value to set |
context | the reader context |
null
, false
otherwise void anch::json::PrimitiveMapper< T >::serializeValue | ( | const T & | value, |
anch::json::WriterContext & | context ) const |
Serialize JSON value
value | the value to serialize |
context | the writer context |