libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Member Functions | List of all members
donut::json::Serializer< T > Struct Template Reference

Base template to specialize in order to implement JSON serialization for a specific type. More...

#include <donut/json.hpp>

Public Member Functions

void serialize (Writer &writer, const T &value)
 

Detailed Description

template<typename T>
struct donut::json::Serializer< T >

Base template to specialize in order to implement JSON serialization for a specific type.

The specialization should have a member function with one of the following signatures:

void serialize(Writer& writer, const T& value)
void serialize(Writer& writer, T value)
void serialize(Writer &writer, const T &value)
Definition: json.hpp:3574

where T is the specialized template type parameter.

The implementation should write the output using the provided Writer.

Template Parameters
Tthe type that this serializer serializes.

Member Function Documentation

◆ serialize()

template<typename T >
void donut::json::Serializer< T >::serialize ( Writer writer,
const T &  value 
)
inline

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