12 #ifndef DOCWIRE_SERIALIZATION_EXCEPTION_H
13 #define DOCWIRE_SERIALIZATION_EXCEPTION_H
15 #include "serialization_base.h"
21 template<
typename T>
requires std::is_base_of_v<std::exception, T>
24 value full(
const T& e)
const {
return object{{{
"what", e.what()}}}; }
Provides a generic, concept-based serialization framework.
value decorate_with_typeid(const value &base_val, const std::string &typeid_str)
Helper to decorate a serialized value with a typeid string.
requires(std::is_arithmetic_v< T > &&!value_alternative< T >) struct serializer< T >
Specialization for arithmetic types (integers, floats).
std::variant< std::nullptr_t, bool, std::int64_t, std::uint64_t, double, std::string, array, object > value
A variant type representing any serialized value.
value full(const T &value)
Serializes a value of type T into a docwire::serialization::value.