Yet another JSON/YAML/BSON serialization library for C++.
Unlike other libraries this one does not require you to build DOM of you object before serialization. Using a declarative C++ style you define what C++ classes (and members) you want to serialize "ThorSerializer" will generate the appropriate code automagically.
- Simple Example
- Bigger Example
- PolyMorphic Example
- Documentation Usage
- Documentation Internal
Can be installed via brew on Mac and Linux
brew install thors-serializer
- Mac: https://formulae.brew.sh/formula/thors-serializer
- Linux: https://formulae.brew.sh/formula-linux/thors-serializer
To install header only version
git clone --single-branch --branch header-only https://github.com/Loki-Astari/ThorsSerializer.git
I have deprecated the
jsonExport() functions. These have been replaced with
jsonExporter() functions (though the original versions still exist but are marked
[[deprecated]]). The main difference is that the new functions catch exceptions (by default) this makes the serialization work like normal C++ serialization and simply set the bad bit on the stream.
Added the all-contributers bot to generate the table.