    

 ## On this page

  

 

 # SerializableTraits&lt; T &gt; Struct Template Reference

 Last update: 16.07.2025 

This header provides a unified way to handle the Json serialization of parameters of different types. Each parameter is stored in an expressive way defining the Type, Range, Value and Multiplicity (Signlton/List) of the serialize object. This is achieved by having a traits class being defined for the parameters Type. Some standard definitions for ints, uints, numbers, strings are available but for serializing custom enums you would typically define this yourself. When de-/serializing a parameter of this type you the would only call the load/save functions depending on single/container parameters. [More...](struct_serializable_traits.xhtml#details)

## <a name="pub-types"></a>Public Types

<a id="aa1bfb2e6cce804883a900653fdf640db"></a>using [CreateRange](struct_serializable_traits.xhtml#aa1bfb2e6cce804883a900653fdf640db) = [CreateRangeNone](struct_create_range_none.xhtml) The Range Type to work with.   
 <a id="ab097986696f004853b8989b257f6bcdf"></a>using [SerializedType](struct_serializable_traits.xhtml#ab097986696f004853b8989b257f6bcdf) = string The type to serialize into.   
 <a id="a19462713b2aab2dae2c87c15f262c1df"></a>using [Type](struct_serializable_traits.xhtml#a19462713b2aab2dae2c87c15f262c1df) = T The type to serialize.   
 ## <a name="pub-static-methods"></a>Static Public Member Functions

<a id="a722bfc2616239aa9f198a76b73b69743"></a>static [SerializedType](struct_serializable_traits.xhtml#ab097986696f004853b8989b257f6bcdf) [access](struct_serializable_traits.xhtml#a722bfc2616239aa9f198a76b73b69743) ([JsonValue](class_json_value.xhtml) v) How to access the serializes type in the JsonObject.   
 <a id="a1d26534c31e8c5b1b9c9684c59c1a524"></a>static [Type](struct_serializable_traits.xhtml#a19462713b2aab2dae2c87c15f262c1df) [convertFrom](struct_serializable_traits.xhtml#a1d26534c31e8c5b1b9c9684c59c1a524) ([SerializedType](struct_serializable_traits.xhtml#ab097986696f004853b8989b257f6bcdf) s) How to turn the SerializedType into the Type.   
 <a id="add861d4bddc999ecd369aa4f9709973a"></a>static [SerializedType](struct_serializable_traits.xhtml#ab097986696f004853b8989b257f6bcdf) [convertTo](struct_serializable_traits.xhtml#add861d4bddc999ecd369aa4f9709973a) ([Type](struct_serializable_traits.xhtml#a19462713b2aab2dae2c87c15f262c1df) t) How to turn the Type into the SerializedType.   
 <a id="a707b939a71a610e3f3dcb789ccf014b8"></a>static constexpr char \* [name](struct_serializable_traits.xhtml#a707b939a71a610e3f3dcb789ccf014b8) () The name of the type in the serialization.   
 <a id="details" name="details"></a>## Detailed Description

### template&lt;typename T&gt;  
struct SerializableTraits&lt; T &gt;

This header provides a unified way to handle the Json serialization of parameters of different types. Each parameter is stored in an expressive way defining the Type, Range, Value and Multiplicity (Signlton/List) of the serialize object. This is achieved by having a traits class being defined for the parameters Type. Some standard definitions for ints, uints, numbers, strings are available but for serializing custom enums you would typically define this yourself. When de-/serializing a parameter of this type you the would only call the load/save functions depending on single/container parameters.

Traits class to give all necessary information on the type You want to serialize. See the json\_parameter.ipp file for standard definitions

Template Parameters TThe type to serialize