reorder navigation, small changes to readme toc, revert readme intro

This commit is contained in:
Alexander Uhlig
2024-11-15 12:44:24 +00:00
committed by GitHub
parent 7ac6e2ee94
commit 4da016729d
4 changed files with 36 additions and 30 deletions
+14 -9
View File
@@ -18,17 +18,19 @@
![image](banner1.png)
Reflect-cpp fills an important gap in C++ development. It minimizes boilerplate code and enhances code safety for seamless and efficient data exchange across system components.
**reflect-cpp** is a C++-20 library for **fast serialization, deserialization and validation** using reflection, similar to [pydantic](https://github.com/pydantic/pydantic) in Python, [serde](https://github.com/serde-rs) in Rust, [encoding](https://github.com/golang/go/tree/master/src/encoding) in Go or [aeson](https://github.com/haskell/aeson/tree/master) in Haskell.
As the aforementioned libraries are among the most widely used in the respective languages, reflect-cpp fills an important gap in C++ development. It reduces boilerplate code and increases code safety.
### Key Features of reflect-cpp:
- [**Standard Library Integration:**](https://github.com/getml/reflect-cpp?tab=readme-ov-file#support-for-containers) Works seamlessly with C++ standard containers.
- [**C++ Idiomatic:**](https://rfl.getml.com) Adheres closely to C++ idioms for an intuitive experience.
- [**Built-in JSON Support:**](https://rfl.getml.com/supported_formats/json.md) Ready-to-use JSON serialization and deserialization.
- [**Simple Installation:**](https://rfl.getml.com/install.md) Quick setup with minimal configuration.
- [**Easily Extensible:**](https://rfl.getml.com/concepts/structs.md) Supports [custom serialization formats](https://rfl.getml.com/supported_formats/supporting_your_own_format) and [custom classes](https://rfl.getml.com/concepts/custom_classes.md).
- [**Benchmarks:**](https://rfl.getml.com/benchmarks.md) Up to 10x faster than other libraries, such as RapidJSON and nlohmann/json.
- [**Built-in JSON Support:**](https://rfl.getml.com/supported_formats/json) Ready-to-use JSON serialization and deserialization.
- [**Simple Installation:**](https://rfl.getml.com/install) Quick setup with minimal configuration.
- [**Easily Extensible:**](https://rfl.getml.com/concepts/structs) Supports [custom serialization formats](https://rfl.getml.com/supported_formats/supporting_your_own_format) and [custom classes](https://rfl.getml.com/concepts/custom_classes).
- [**Benchmarks:**](https://rfl.getml.com/benchmarks) Up to 10x faster than other libraries, such as RapidJSON and nlohmann/json.
<br>
@@ -37,15 +39,16 @@ Reflect-cpp fills an important gap in C++ development. It minimizes boilerplate
### On this page
- [Serialization formats](#serialization-formats)
- [Simple Example](#simple-example)
- [More Comprehensive Example](#more-comprehensive-example)
- [Feature Overview]()
- [Simple Example](#simple-example)
- [More Comprehensive Example](#more-comprehensive-example)
- [Error messages](#error-messages)
- [JSON schema](#json-schema)
- [Enums](#enums)
- [Algebraic data types](#algebraic-data-types)
- [Extra fields](#extra-fields)
- [Reflective programming](#reflective-programming)
- [Standard Library Integration](#support-for-containers)
- [Standard Library Integration](#support-for-containers)
- [The team behind reflect-cpp](#the-team-behind-reflect-cpp)
- [License](#license)
@@ -56,7 +59,6 @@ Reflect-cpp fills an important gap in C++ development. It minimizes boilerplate
- [Compiling and running the tests ↗](https://rfl.getml.com/contributing/#compiling-and-running-the-tests)
## Serialization formats
reflect-cpp provides a unified reflection-based interface across different serialization formats. It is deliberately designed in a very modular way, using [concepts](https://en.cppreference.com/w/cpp/language/constraints), to make it as easy as possible to interface various C or C++ libraries related to serialization. Refer to the [documentation](https://rfl.getml.com/supported_formats/bson/) for details.
@@ -79,6 +81,9 @@ Support for more serialization formats is in development. Refer to the [issues](
Please also refer to the *vcpkg.json* in this repository.
# Feature Overview
## Simple Example
```cpp
+9 -7
View File
@@ -6,19 +6,17 @@ hide:
# Documentation
[Benchmarks](benchmarks.md) - Extensive benchmarks of popular libraries for serialization, deserialization.
## The basics
<!-- [Structs](structs.md) - Recaps the motivating example in the README. A struct is the equivalent of an AND statement or a product type in type theory. -->
<!-- [Structs](concepts/structs.md) - Recaps the motivating example in the README. A struct is the equivalent of an AND statement or a product type in type theory. -->
[Optional fields](optional_fields.md) - For defining fields in your serialized format that might be absent in some cases.
[Struct flattening](flatten_structs.md) - For making struct A "inherit" the fields of struct B.
<!-- [Processors](processors.md) - For modifying the structs before serialization and deserialization. For instance, processors can be used to transform all field names from `snake_case` to `camelCase`. -->
<!-- [Processors](concepts/processors.md) - For modifying the structs before serialization and deserialization. For instance, processors can be used to transform all field names from `snake_case` to `camelCase`. -->
<!-- [The rfl::Field-syntax](field_syntax.md) - Describes an alternative syntax which requires slightly more effort, but allows for some powerful functionalities. -->
<!-- [The rfl::Field-syntax](concepts/field_syntax.md) - Describes an alternative syntax which requires slightly more effort, but allows for some powerful functionalities. -->
[String literals](literals.md) - For representing strings that can only assume a limited number of enumerated values.
@@ -64,7 +62,7 @@ hide:
## Custom classes
<!-- [Custom classes](custom_classes.md) - For custom classes with private fields. -->
<!-- [Custom classes](concepts/custom_classes.md) - For custom classes with private fields. -->
[Custom parsers for your classes](custom_parser.md) - For custom classes with private fields that you want to leave absolutely untouched.
@@ -100,6 +98,10 @@ hide:
## Advanced topics
<!-- [Supporting your own format](supporting_your_own_format.md) - For supporting your own serialization and deserialization formats. -->
<!-- [Supporting your own format](supported_formats/supporting_your_own_format.md) - For supporting your own serialization and deserialization formats. -->
[Maintaining backwards compatability](backwards_compatability.md) - Instructions on how to ensure that your API is backwards-compatible with older versions.
[Benchmarks](benchmarks.md) - Extensive benchmarks of popular libraries for serialization, deserialization.
<br>
+4 -5
View File
@@ -10,9 +10,6 @@ hide:
# ![C++](https://img.shields.io/badge/c++-%237156c2.svg?style=for-the-badge&logo=c%2B%2B&logoColor=white) reflect-cpp
**reflect-cpp** is a C++-20 library for **fast serialization, deserialization and validation** using reflection, similar to [pydantic](https://github.com/pydantic/pydantic) in Python, [serde](https://github.com/serde-rs) in Rust, [encoding](https://github.com/golang/go/tree/master/src/encoding) in Go or [aeson](https://github.com/haskell/aeson/tree/master) in Haskell.
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)
[![Generic badge](https://img.shields.io/badge/C++-20-blue.svg)](https://shields.io/)
@@ -24,15 +21,17 @@ hide:
</div>
><br> **📣 From the Author (01.11.2024):** Hi everyone, Patrick ([liuzicheng1987](https://github.com/liuzicheng1987)) here. With reflect-cpp reaching the 1k-star milestone, we’re excited to roll out an overhauled documentation site at [https://rfl.getml.com](https://rfl.getml.com/), giving it a permanent place in our company. Initially developed as an internal tool for our machine learning library, [getML](https://getml.com), reflect-cpp has grown into something much larger.
<br> A big thank you to all contributors for helping us reach this point! Your feedback, ideas, and dedication have been invaluable.
<br> As we look to the project’s future, I would like to hear your thoughts on potential new directions, discuss ideas to expand our user base, or learn more about what you’re building with it. For the next month, I am opening a few slots in my calendar for anyone who wants to [connect (link)](https://calendar.app.google/AaeziooCNierbwAZ8).
<br> *— Best, Patrick*
<br>&nbsp;
Reflect-cpp fills an important gap in C++ development. It minimizes boilerplate code and enhances code safety for seamless and efficient data exchange across system components.
<br>
**reflect-cpp** is a C++-20 library for **fast serialization, deserialization and validation** using reflection, similar to [pydantic](https://github.com/pydantic/pydantic) in Python, [serde](https://github.com/serde-rs) in Rust, [encoding](https://github.com/golang/go/tree/master/src/encoding) in Go or [aeson](https://github.com/haskell/aeson/tree/master) in Haskell.
reflect-cpp fills an important gap in C++ development. It minimizes boilerplate code and enhances code safety for seamless and efficient data exchange across system components.
<h3> Key Features of reflect-cpp:</h3>
+9 -9
View File
@@ -76,15 +76,15 @@ exclude_docs: |
nav:
- Welcome: index.md
- Concepts:
- Structs: concepts/structs.md
- Custom Classes: concepts/custom_classes.md
- Fields: concepts/field_syntax.md
# - Type: concepts/types.md
- Processors: concepts/processors.md
# - Serialization: concepts/serialization.md
# - Validators: concepts/validators.md
# - Errors handling: concepts/errors.md
# - Concepts:
# - Structs: concepts/structs.md
# - Custom Classes: concepts/custom_classes.md
# - Fields: concepts/field_syntax.md
# # - Type: concepts/types.md
# - Processors: concepts/processors.md
# # - Serialization: concepts/serialization.md
# # - Validators: concepts/validators.md
# # - Errors handling: concepts/errors.md
- Supported Formats:
- BSON: supported_formats/bson.md
- CBOR: supported_formats/cbor.md