12 #ifndef DOCWIRE_SERIALIZATION_DATA_SOURCE_H
13 #define DOCWIRE_SERIALIZATION_DATA_SOURCE_H
15 #include "data_source.h"
16 #include "serialization_base.h"
17 #include "serialization_file_extension.h"
18 #include "serialization_filesystem.h"
37 {
"path", serialization::typed_summary(data.
path())},
38 {
"file_extension", serialization::typed_summary(data.
file_extension())}
39 }}, type_name::pretty<data_source>());
std::optional< docwire::file_extension > file_extension() const
Returns the file extension if available.
std::optional< std::filesystem::path > path() const
Returns the file path if the source is a file, otherwise std::nullopt.
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.
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.
Primary template for the serializer.