nfx-serialization 0.3.0
Cross-platform C++ JSON serialization library with extensible trait capabilities
Loading...
Searching...
No Matches
nfx::serialization::json::Serializer< T >::Options Struct Reference

Serialization options and context. More...

#include <nfx/serialization/json/Serializer.h>

Public Member Functions

 Options ()=default
 Default constructor.
template<typename U>
void copyFrom (const typename Serializer< U >::Options &other)
 Copy values from another serializer's options.

Static Public Member Functions

template<typename U>
static Options createFrom (const typename Serializer< U >::Options &other)
 Create Options with values copied from another serializer's options.

Public Attributes

bool includeNullFields = false
 Include fields with null values in output.
bool prettyPrint = false
 Format output with indentation (2 spaces per level).
bool validateOnDeserialize = true
 Validate data during deserialization.

Detailed Description

template<typename T>
struct nfx::serialization::json::Serializer< T >::Options

Serialization options and context.

Definition at line 61 of file Serializer.h.

Member Function Documentation

◆ copyFrom()

template<typename T>
template<typename U>
void nfx::serialization::json::Serializer< T >::Options::copyFrom ( const typename Serializer< U >::Options & other)
inline

Copy values from another serializer's options.

Template Parameters
UThe source serializer type
Parameters
otherOptions from another serializer type

◆ createFrom()

template<typename T>
template<typename U>
Options nfx::serialization::json::Serializer< T >::Options::createFrom ( const typename Serializer< U >::Options & other)
inlinestatic

Create Options with values copied from another serializer's options.

Template Parameters
UThe source serializer type
Parameters
otherOptions from another serializer type
Returns
New Options instance with copied values
Here is the call graph for this function:

Member Data Documentation

◆ includeNullFields

template<typename T>
bool nfx::serialization::json::Serializer< T >::Options::includeNullFields = false

Include fields with null values in output.

Definition at line 63 of file Serializer.h.

◆ prettyPrint

template<typename T>
bool nfx::serialization::json::Serializer< T >::Options::prettyPrint = false

Format output with indentation (2 spaces per level).

Definition at line 64 of file Serializer.h.

◆ validateOnDeserialize

template<typename T>
bool nfx::serialization::json::Serializer< T >::Options::validateOnDeserialize = true

Validate data during deserialization.

Definition at line 65 of file Serializer.h.


The documentation for this struct was generated from the following file: