Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d1f8422
fix(reflection): fix dangling string_view in rfl::internal::get_type_…
clockblocker Nov 28, 2026
e5c6053
fix(validation): fix rfl::OneOf broken .and_then().or_else() composition
clockblocker Nov 29, 2026
89c3661
fix(json): reject uint64 > INT64_MAX instead of silently wrapping int…
clockblocker Nov 28, 2026
b9dc1e9
feat(json-schema): emit oneOf for rfl::TaggedUnion in JSON Schema (#375)
clockblocker Nov 29, 2026
07ef2b6
fix(headers): eliminate -Wextra, -Wextra-semi, -Wsign-conversion, and…
clockblocker Nov 27, 2026
4879f7e
fix(parsing): gate <expected> include behind <version> feature test t…
clockblocker Nov 30, 2026
d9ae712
feat(enums): accept std::string_view in rfl::string_to_enum (#565)
clockblocker Nov 27, 2026
b14e27d
perf(headers): trim <functional>, <sstream>, and unused <map> from th…
clockblocker Nov 28, 2026
e4ec067
fix(yaml): guard rfl::yaml::Reader against recursive aliases and out-…
clockblocker Nov 25, 2026
c9260ba
fix(yaml): reject negative-to-unsigned wraparound, narrow integer ove…
clockblocker Nov 29, 2026
6817a8c
fix(xml): fix get_field_from_array index increment and write() indent…
clockblocker Nov 27, 2026
0976a9d
fix(env): use getenv_s and _dupenv_s under _MSC_VER in rfl::env::Reader
clockblocker Nov 30, 2026
617287c
fix(yaml): return error on non-scalar mapping keys instead of silentl…
clockblocker Nov 29, 2026
18b67b8
fix(parsing): prevent std::terminate() at noexcept validation, map-ke…
clockblocker Nov 29, 2026
706209e
fix(parsing): capture input keys matching ExtraFields member name
clockblocker Nov 29, 2026
14ac63a
perf(strings): fix O(N^2) replace_all and split and empty-needle infi…
clockblocker Nov 30, 2026
bcdb806
docs(licensing): add THIRD_PARTY_NOTICES for vendored dependencies
clockblocker Nov 29, 2026
37daf51
fix(enums): backport enchantum MSVC 64-bit enum cast suffix fix
clockblocker Nov 30, 2026
9895184
fix(json-schema): flatten nested anyOf for optional variants and rfl:…
clockblocker Nov 29, 2026
1d82fbe
feat(cli): add rfl::cli::usage to generate usage and help text (#692)
clockblocker Nov 29, 2026
619093c
feat(json): add first-class rfl::json read and write flag constants
clockblocker Nov 29, 2026
1d7fda8
perf(parsing): isolate per-field helpers in NamedTupleParser, destruc…
clockblocker Nov 29, 2026
3c83d64
perf(tuple): replace O(N^2) calculate_positions fold and per-index Tu…
clockblocker Nov 30, 2026
996450d
perf(internal): add apply_to_fields and avoid NamedTuple in HasDefaul…
clockblocker Nov 29, 2026
30a6c17
fix(error): preserve structured Error::details() paths in FieldVarian…
clockblocker Nov 29, 2026
202aef9
perf(generic): eliminate O(N*D) subtree deep copies in Generic constr…
clockblocker Nov 30, 2026
5226789
perf(internal): use O(log N) exponential + binary search in cpp20::nu…
clockblocker Nov 29, 2026
96c702e
perf(parsing): isolate per-field helpers in ViewReader and ViewReader…
clockblocker Nov 29, 2026
4df5fa4
feat(enums): add rfl::TransformEnumNames processors (#731)
clockblocker Nov 29, 2026
2a5c5e5
feat(reflection): add public rfl::type_name<T>() and rfl::type_name_v<T>
clockblocker Nov 29, 2026
cdd840a
perf(schema): fast-path scalar defaults in NamedTupleParser::to_schema
clockblocker Nov 29, 2026
6dd9094
perf(cli): lower_bound prefix skipping in cli::Reader, O(F) usage pos…
clockblocker Nov 30, 2026
804b2ec
perf(named-tuple): O(1)-instantiation find_index, non-recursive find_…
clockblocker Nov 30, 2026
ad4eb80
perf(processors): eliminate redundant Tuple round-trip copies in case…
clockblocker Nov 30, 2026
14c0bff
feat(json-schema): add rfl::IntegerBounds opt-in processor (#683)
clockblocker Nov 29, 2026
246d2a7
fix(schema): cast char to unsigned char for std::isalnum and add miss…
clockblocker Nov 29, 2026
c0c9773
feat(reflection): expose public rfl::StringLiteral header and constex…
clockblocker Nov 29, 2026
a50a44f
perf(literal): O(1) name lookup, O(log N) string lookup, and O(1)-ins…
clockblocker Nov 30, 2026
cf93acb
perf(formats): O(1) Cap'n Proto union discriminant, O(log M) flexbuf/…
clockblocker Nov 30, 2026
09e467b
perf(internal): O(1) nth_element/nth_element_t, single-bind C++20 get…
clockblocker Nov 30, 2026
86b6df1
feat(json-schema): add rfl::VariantsAsOneOf opt-in processor (#375)
clockblocker Nov 29, 2026
d29bef9
perf(parsing): short-circuit dispatch and symbol isolation for Parser…
clockblocker Nov 30, 2026
fceab34
perf(parsing): add FieldNameLookup cursor-hint and binary-search fiel…
clockblocker Nov 29, 2026
5f22bf4
perf(parsing): O(log K) lookup and symbol isolation for FieldVariantR…
clockblocker Nov 30, 2026
804ce17
perf(parsing): O(1) TupleReader dispatch, strip-name/destructor symbo…
clockblocker Nov 30, 2026
726f145
fix(schema): unwrap Type::Description and Type::Deprecated in Avro an…
clockblocker Nov 29, 2026
a2ea63e
feat(enums): add rfl::EnumNames<E> per-enum wire-name trait (#106)
clockblocker Nov 29, 2026
b684af6
feat(json): add rfl::json::Raw for passthrough raw JSON values (#368)
clockblocker Nov 29, 2026
ce62047
perf(variant): inline switch-based Variant::visit, O(1) get_if/elemen…
clockblocker Nov 30, 2026
026057b
perf(tuple): single-pass O(N) tuple_cat, move_from_tuple fast path, w…
clockblocker Nov 30, 2026
b874d5d
build(cmake): subproject ergonomics, CMake 3.20 support, warning/lint…
clockblocker Nov 30, 2026
0c2fed1
perf(schema): eliminate O(N^2) Object::operator[] schema insertions a…
clockblocker Nov 30, 2026
0cb5873
build(cmake): isolate bundled yyjson visibility, support external yyj…
clockblocker Nov 30, 2026
f0bcaca
perf(internal): O(N) remove_fields and balanced define_* type builders
clockblocker Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
652 changes: 509 additions & 143 deletions CMakeLists.txt

Large diffs are not rendered by default.

42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ reflect-cpp and sqlgen fill important gaps in C++ development. They reduce boile
- [Extra fields](#extra-fields)
- [Reflective programming](#reflective-programming)
- [Standard Library Integration](#support-for-containers)
- [Installation](#installation)
- [The team behind reflect-cpp](#the-team-behind-reflect-cpp)
- [License](#license)

### More in our [documentation](https://munich-data-engineering.github.io/reflect-cpp):
- [Installation ↗](https://munich-data-engineering.github.io/reflect-cpp/install/#option-2-compilation-using-cmake)
- [Installation ↗](https://munich-data-engineering.github.io/reflect-cpp/install/#option-3-compilation-using-cmake)
- [C++26 reflection ↗](https://munich-data-engineering.github.io/reflect-cpp/cpp26_reflection)
- [Benchmarks ↗](https://munich-data-engineering.github.io/reflect-cpp/benchmarks)
- [How to contribute ↗](https://munich-data-engineering.github.io/reflect-cpp/contributing)
Expand Down Expand Up @@ -373,6 +374,17 @@ struct Config {
// ./app data.csv -o /tmp/out -v --count=10
```

`rfl::cli::usage` generates the help text from the same struct, for instance for `--help`:

```cpp
if (argc > 1 && std::string_view(argv[1]) == "--help") {
std::cout << rfl::cli::usage<Config>(argv[0], true).value();
// Usage: ./app <input-file> -o|--output-dir=<value> -v|--verbose[=<bool>] --count=<value>
//
// Arguments: ...
}
```

Nested structs, `std::optional`, `std::vector`, enums, `rfl::Flatten` and `rfl::Rename` are all supported. Refer to the [documentation](https://munich-data-engineering.github.io/reflect-cpp/cli) for details.

### Error messages
Expand Down Expand Up @@ -671,6 +683,7 @@ In addition, it supports the following custom containers:
- `rfl::Tuple`: An alternative to `std::tuple` that compiles considerably faster.
- `rfl::Validator`: Allows for automatic input validation.
- `rfl::Variant`: An alternative to `std::variant` that compiles considerably faster.
- `rfl::json::Raw`: Holds a raw JSON value for passthrough serialization and deserialization (JSON only; [details](https://munich-data-engineering.github.io/reflect-cpp/supported_formats/json/#raw-json-passthrough-rfljsonraw)).

#### Custom classes

Expand All @@ -687,6 +700,29 @@ The following compilers are supported for C++-20:
The following compilers are supported for C++-26:
- GCC 16.2 or higher

### Using CMake FetchContent

JSON-only (zero external dependencies — `yyjson`, `ctre`, and `enchantum` are bundled):

```cmake
include(FetchContent)
FetchContent_Declare(reflectcpp
GIT_REPOSITORY https://github.com/munich-data-engineering/reflect-cpp.git
GIT_TAG main # replace with a release tag containing CMake 3.20 / subproject support
GIT_SHALLOW TRUE
GIT_SUBMODULES "")
FetchContent_MakeAvailable(reflectcpp)
target_link_libraries(your_project PRIVATE reflectcpp::reflectcpp)
```

To enable additional formats (for example YAML), set the corresponding `REFLECTCPP_*` option **before** `FetchContent_MakeAvailable(reflectcpp)` (non-JSON format libraries are resolved via `find_package` from system packages, vcpkg, or Conan because `REFLECTCPP_USE_VCPKG` defaults to `OFF` when consumed as a subproject):

```cmake
set(REFLECTCPP_YAML ON)
FetchContent_MakeAvailable(reflectcpp)
target_link_libraries(your_project PRIVATE reflectcpp::reflectcpp)
```

### Using vcpkg

https://vcpkg.io/en/package/reflectcpp
Expand Down Expand Up @@ -722,7 +758,7 @@ cmake --build build -j 4 # gcc, clang
cmake --build build --config Release -j 4 # MSVC
```

For other installation methods, refer to the [documentation](https://munich-data-engineering.github.io/reflect-cpp/docs-readme).
For other installation methods, refer to the [documentation](https://munich-data-engineering.github.io/reflect-cpp/install).

### Compiling with C++-26 reflection

Expand Down Expand Up @@ -752,3 +788,5 @@ reflect-cpp includes [YYJSON](https://github.com/ibireme/yyjson), the fastest JS
reflect-cpp includes [compile-time-regular-expressions](https://github.com/hanickadot/compile-time-regular-expressions). CTRE is written by Hana Dusíková and released under the Apache-2.0 License with LLVM exceptions.

reflect-cpp includes [enchantum](https://github.com/ZXShady/enchantum/tree/main). enchantum is written by ZXShady and also released under the MIT License.

See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for full third-party license texts, SPDX identifiers, and CMake/feature inclusion conditions.
322 changes: 322 additions & 0 deletions THIRD_PARTY_NOTICES.md

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2")
if (NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2")
elseif (REFLECTCPP_STRICT_WARNINGS)
# Restore /W3 for benchmark targets after top-level CMakeLists strips /W3 before setting /W4 on reflectcpp.
add_compile_options(/W3)
endif ()

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std:c++20 -O2")
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/all/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project(reflect-cpp-all-format-benchmarks)
project(reflect-cpp-all-format-benchmarks LANGUAGES CXX)

file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS "*.cpp")

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/json/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project(reflect-cpp-json-benchmarks)
project(reflect-cpp-json-benchmarks LANGUAGES CXX)

file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS "*.cpp")

Expand Down
23 changes: 23 additions & 0 deletions docs/content/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,26 @@ constexpr auto enumerator_array = rfl::get_enumerator_array<Color>();

In case it's more convenient to get the enumerator values as values of the enum's underlying type rather than values of the enum type itself,
there is also `rfl::get_underlying_enumerators<EnumType>()` and `rfl::get_underlying_enumerator_array<EnumType>()`.

## Custom wire names (`rfl::EnumNames` and `rfl::TransformEnumNames`)

To customize serialized enum wire names across JSON, CLI, Generic, XML, YAML, and JSON Schema without duplicating enumerators as `rfl::Literal<...>`, specialize `rfl::EnumNames<E>` and/or pass a `rfl::TransformEnumNames<...>` processor (`rfl::EnumSnakeCaseToKebabCase`, `rfl::EnumSnakeCaseToCamelCase`, `rfl::EnumSnakeCaseToPascalCase`, `rfl::EnumCamelCaseToSnakeCase`, `rfl::EnumToLowerCase`, `rfl::EnumToUpperCase`):

```cpp
enum class OptimizationLevel { no_opt, size_opt, speed_opt, cxx_standard };

template <>
struct rfl::EnumNames<OptimizationLevel> {
static constexpr rfl::EnumNameTransform transform =
rfl::EnumNameTransform::snake_to_kebab;
static constexpr std::array<rfl::EnumOverride<OptimizationLevel>, 1>
overrides = {{
{OptimizationLevel::cxx_standard, "c++20"},
}};
};
```

- `overrides` (either a static contiguous range or a static `overrides()` returning a borrowed contiguous range such as `std::span<const rfl::EnumOverride<E>>`) takes precedence over `transform`, and also supports enumerators outside the default reflected range.
- `transform` can be either a `rfl::EnumNameTransform` constant or a static callable `transform(std::string_view)` returning `std::string` or `std::string_view`.
- If `rfl::EnumNames<E>` only defines `overrides` (without `transform`), non-overridden enumerators still receive any `rfl::TransformEnumNames<...>` processor passed to `read`, `write`, or `to_schema`.
- Use `rfl::get_enum_wire_names<E, Processors...>()` to inspect resolved `(wire_name, enumerator)` pairs.
45 changes: 41 additions & 4 deletions docs/content/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,41 @@ Simply use [this recipe](https://conan.io/center/recipes/reflect-cpp).

## Option 3: Compilation using cmake

### Using FetchContent

To consume reflect-cpp directly from a CMake project with JSON support only (zero external dependencies — `yyjson`, `ctre`, and `enchantum` are bundled):

```cmake
include(FetchContent)
FetchContent_Declare(reflectcpp
GIT_REPOSITORY https://github.com/munich-data-engineering/reflect-cpp.git
GIT_TAG main # replace with a release tag containing CMake 3.20 / subproject support
GIT_SHALLOW TRUE
GIT_SUBMODULES "")
FetchContent_MakeAvailable(reflectcpp)
target_link_libraries(your_project PRIVATE reflectcpp::reflectcpp)
```

To enable additional serialization formats (for example YAML), set the corresponding `REFLECTCPP_*` option **before** `FetchContent_MakeAvailable(reflectcpp)`:

```cmake
set(REFLECTCPP_YAML ON)
FetchContent_MakeAvailable(reflectcpp)
target_link_libraries(your_project PRIVATE reflectcpp::reflectcpp)
```

When reflect-cpp is consumed as a subproject, `REFLECTCPP_USE_VCPKG` defaults to `OFF`, so each non-JSON format's underlying library (such as `yaml-cpp`) is resolved via `find_package` from your system packages, vcpkg toolchain, or Conan generator.

### Subproject packaging options & `reflectcpp::headers`

When embedding reflect-cpp inside larger projects or shared libraries, additional CMake controls are available:

- **`REFLECTCPP_USE_BUNDLED_YYJSON`** (defaults to `REFLECTCPP_USE_BUNDLED_DEPENDENCIES`) and **`REFLECTCPP_YYJSON_TARGET`** (defaults to `yyjson::yyjson` when `REFLECTCPP_USE_BUNDLED_YYJSON=OFF`): reuse an existing external `yyjson` target without disabling bundled `ctre`/`enchantum`. *(Note: if you mix `REFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF` with `REFLECTCPP_USE_BUNDLED_YYJSON=ON`, ensure no external `<yyjson.h>` on your include path shadows the bundled header.)*
- **`REFLECTCPP_HIDDEN_VISIBILITY`** (default `OFF`): compiles static `reflectcpp` with hidden symbol visibility (`-fvisibility=hidden` / `-fvisibility-inlines-hidden`). Bundled `yyjson_*` symbols are already hidden by default on static non-Windows builds so consumer shared libraries never re-export them.
- **`reflectcpp::headers`**: an exported `INTERFACE` target propagating core reflection (`ctre`/`enchantum`) and JSON (`yyjson`) headers, compile features, and compile definitions without linking compiled `reflectcpp` objects (useful for header-only reflection or intermediate `OBJECT` libraries; final binaries/DSOs using out-of-line symbols still link `reflectcpp::reflectcpp`, and non-JSON backends are not propagated through `reflectcpp::headers`).

### Building standalone

This will compile reflect-cpp with JSON support only. You can then include reflect-cpp in your project and link to the binary.

```bash
Expand All @@ -44,6 +79,8 @@ cmake --build build -j 4 # gcc, clang
cmake --build build --config Release -j 4 # MSVC
```

> **Tip (Windows multi-config installs):** When installing both `Debug` and `Release` configurations into the same prefix with Visual Studio, pass `-DCMAKE_DEBUG_POSTFIX=d` so Debug (`reflectcppd.lib`) and Release (`reflectcpp.lib`) libraries coexist without overwriting each other.

## Option 4: Include source files into your own build

Simply copy the contents of the folders `include` and `src` into your source repository or add it to your include path and also add `src/reflectcpp.cpp` and `src/reflectcpp_json.cpp` and `src/yyjson.c` to your source files for compilation.
Expand Down Expand Up @@ -72,11 +109,9 @@ cmake --build build -j 4 # gcc, clang
cmake --build build --config Release -j 4 # MSVC
```

To use reflect-cpp in your project:
To use reflect-cpp in your project as a subdirectory, set any optional format flags **before** `add_subdirectory`:

```cmake
add_subdirectory(reflect-cpp) # Add this project as a subdirectory

set(REFLECTCPP_AVRO ON) # Optional
set(REFLECTCPP_BSON ON) # Optional
set(REFLECTCPP_CBOR ON) # Optional
Expand All @@ -87,7 +122,9 @@ set(REFLECTCPP_UBJSON ON) # Optional
set(REFLECTCPP_XML ON) # Optional
set(REFLECTCPP_YAML ON) # Optional

target_link_libraries(your_project PRIVATE reflectcpp) # Link against the library
add_subdirectory(reflect-cpp) # Add this project as a subdirectory

target_link_libraries(your_project PRIVATE reflectcpp::reflectcpp) # Link against the library
```

### Troubleshooting vcpkg
Expand Down
25 changes: 25 additions & 0 deletions docs/content/json_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,31 @@ This will result in the following JSON schema:

You can insert this into the tools mentioned above and see the generated code.

## Variants and tagged unions

`rfl::TaggedUnion` becomes `oneOf`: every alternative has a different tag, so a value
matches exactly one of them.

`rfl::Variant` and `std::variant` become `anyOf`, because their alternatives can overlap:
`1` is both an `integer` and a `number`, and `{"width": 1, "height": 2}` matches both
`Square` and `Rectangle` from the example in [variants](../variants_and_tagged_unions).
`oneOf` would reject such values, even though reflect-cpp reads them without problems.

If you know that the alternatives of your variants never overlap, you can pass
`rfl::VariantsAsOneOf` to get `oneOf` for `rfl::Variant` and `std::variant` as well:

```cpp
const std::string json_schema =
rfl::json::to_schema<rfl::Variant<int, std::string>, rfl::VariantsAsOneOf>();
```

Warning: `oneOf` rejects values that match more than one alternative, so with this
processor the schema rejects `1` for `rfl::Variant<int, double>`. Structs can overlap
as well, for instance when additional properties are allowed (see `rfl::NoExtraFields`).

`std::optional` and `rfl::Generic` stay `anyOf` either way. `std::optional` is not
a variant, and the alternatives of `rfl::Generic` overlap (`1` is both an `integer` and a `number`).

## Adding descriptions

JSON schemata also often contain descriptions. reflect-cpp supports this as well.
Expand Down
50 changes: 50 additions & 0 deletions docs/content/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ reflect-cpp currently supports the following processors:
- `rfl::NoFieldNames`
- `rfl::NoOptionals`
- `rfl::UnderlyingEnums`
- `rfl::VariantsAsOneOf`
- `rfl::SnakeCaseToCamelCase`
- `rfl::SnakeCaseToPascalCase`

Expand Down Expand Up @@ -492,6 +493,19 @@ The resulting JSON string looks like this:
{"radius":2.0,"color":1}
```

### `rfl::VariantsAsOneOf`

By default, the JSON schema describes `rfl::Variant` and `std::variant` as `anyOf`.
By passing the processor `rfl::VariantsAsOneOf` to `rfl::json::to_schema`, they
become `oneOf`:

```cpp
rfl::json::to_schema<rfl::Variant<int, std::string>, rfl::VariantsAsOneOf>();
```

It only changes the schema, not reading or writing. Please refer to
the [JSON schema documentation](../json_schema) for details.

### `rfl::SnakeCaseToCamelCase`

Please refer to the example above.
Expand Down Expand Up @@ -549,6 +563,42 @@ The resulting JSON string looks like this:
{"type":"Person","firstName":"Homer","lastName":"Simpson","age":45}
```

## `rfl::TransformEnumNames` (`EnumSnakeCaseToKebabCase`, etc.)

Applies a whole-enum wire-name casing transform to enum fields during reading,
writing, and JSON Schema generation. Resolved wire-name tables are cached once
per `(EnumType, EnumNameTransform)` pair.

Built-in aliases:
- `rfl::EnumSnakeCaseToKebabCase`
- `rfl::EnumSnakeCaseToCamelCase`
- `rfl::EnumSnakeCaseToPascalCase`
- `rfl::EnumCamelCaseToSnakeCase`
- `rfl::EnumToLowerCase`
- `rfl::EnumToUpperCase`

```cpp
enum class CostModel { t_count, two_qubit_gate_count, gate_count };
struct Config { CostModel cost_model; };

const auto json_str = rfl::json::write<rfl::EnumSnakeCaseToKebabCase>(
Config{.cost_model = CostModel::two_qubit_gate_count});
// {"cost_model":"two-qubit-gate-count"}
```

## `rfl::IntegerBounds`

Opt-in schema processor that emits C++ integer width `minimum` and `maximum`
keywords in JSON Schema for signed and unsigned integer types (`int8_t`–`int64_t`,
`uint8_t`–`uint64_t`, etc.), excluding `bool`, character types (`char`, `wchar_t`,
`char8_t`, `char16_t`, `char32_t`), and `rfl::UnderlyingEnums`.

```cpp
struct NetConfig { uint16_t port; };
const auto schema = rfl::json::to_schema<NetConfig, rfl::IntegerBounds>();
// "port": {"type":"integer","minimum":0,"maximum":65535}
```

## Writing your own processors

In principle, writing your own processors is not very difficult. You need to define a struct, which takes has a static method called `process` taking a named tuple as an input and then returning a modified named tuple. The `process` method should accept the type of the original struct as a template parameter.
Expand Down
Loading
Loading