niXman / Yas
Yet Another Serialization
Stars: ✭ 388
Programming Languages
cplusplus
227 projects
Labels
Projects that are alternatives of or similar to Yas
Savegamefree
Save Game Free is a free and simple but powerful solution for saving and loading game data in unity.
Stars: ✭ 279 (-28.09%)
Mutual labels: serialization
Msgpack.php
A pure PHP implementation of the MessagePack serialization format / msgpack.org[PHP]
Stars: ✭ 327 (-15.72%)
Mutual labels: serialization
Ceras
Universal binary serializer for a wide variety of scenarios https://discord.gg/FGaCX4c
Stars: ✭ 374 (-3.61%)
Mutual labels: serialization
Messagepack Csharp
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
Stars: ✭ 3,668 (+845.36%)
Mutual labels: serialization
Typedefs
Programming language agnostic type construction language based on polynomials.
Stars: ✭ 337 (-13.14%)
Mutual labels: serialization
Handyjson
A handy swift json-object serialization/deserialization library
Stars: ✭ 3,913 (+908.51%)
Mutual labels: serialization
Kim
Kim: A JSON Serialization and Marshaling framework
Stars: ✭ 326 (-15.98%)
Mutual labels: serialization
Leopotamgrouplibraryunity
Tools library for unity 3d game engine: animator graph helpers, serialization (json), localization, event routing (eventbus, ui actions), embedded scripting, uGui xml markup, threading, tweening, in-memory protection and other helpers (pure C#)
Stars: ✭ 373 (-3.87%)
Mutual labels: serialization
Hprose Nodejs
Hprose is a cross-language RPC. This project is Hprose 2.0 for Node.js
Stars: ✭ 297 (-23.45%)
Mutual labels: serialization
Bebop
An extremely simple, fast, efficient, cross-platform serialization format
Stars: ✭ 305 (-21.39%)
Mutual labels: serialization
Velocypack
A fast and compact format for serialization and storage
Stars: ✭ 347 (-10.57%)
Mutual labels: serialization
Flatbuffers
FlatBuffers: Memory Efficient Serialization Library
Stars: ✭ 17,180 (+4327.84%)
Mutual labels: serialization
Marklib
A small library to wrap serializable TextSelections.
Stars: ✭ 375 (-3.35%)
Mutual labels: serialization
Kotlinx.serialization
Kotlin multiplatform / multi-format serialization
Stars: ✭ 3,550 (+814.95%)
Mutual labels: serialization
Metastuff
Code I use in my game for all serialization/deserialization/introspection stuff
Stars: ✭ 337 (-13.14%)
Mutual labels: serialization
Lockstepengine
A lockstep solution include lots of deterministic library (Math,Collision,Navmesh,BehaviorTree,Serialization ...)
Stars: ✭ 376 (-3.09%)
Mutual labels: serialization
Hprose
HPROSE is short for High Performance Remote Object Service Engine. It's a serialize and RPC library, the serialize library of hprose is faster, smaller and more powerful than msgpack, the RPC library is faster, easier and more powerful than thrift.
Stars: ✭ 348 (-10.31%)
Mutual labels: serialization
YAS
Yet Another Serialization
- YAS is created as a replacement of boost.serialization because of its insufficient speed of serialization (benchmark 1, benchmark 2)
- YAS is header only library
- YAS does not depend on third-party libraries or boost
- YAS require C++11 support
- YAS binary archives is endian independent
Supported the following types of archives:
- binary
- text
- json (not fully comply)
Supported the following compilers:
- GCC : 4.8.5, ... - 32/64 bit
- MinGW: 4.8.5, ... - 32/64 bit
- Clang: 3.5, ... - 32/64 bit
- Intel: (untested)
- MSVC : 2017(in c++14 mode), ... - 32/64 bit
- Emscripten: 1.38 (clang version 6.0.1)
Samples
The easiest way to save and load some object or vars is to use the yas::save()
and yas::load()
functions like this:
#include <yas/serialize.hpp>
#include <yas/std_types.hpp>
int main() {
int a = 3, aa{};
short b = 4, bb{};
float c = 3.14, cc{};
constexpr std::size_t flags =
yas::mem // IO type
|yas::json; // IO format
auto buf = yas::save<flags>(
YAS_OBJECT("myobject", a, b, c)
);
// buf = {"a":3,"b":4,"c":3.14}
yas::load<flags>(buf,
YAS_OBJECT_NVP("myobject"
,("a", aa)
,("b", bb)
,("c", cc)
)
);
// a == aa && b == bb && c == cc;
}
The IO type can be one of yas::mem
or yas::file
.
The IO format can be one of yas::binary
or yas::text
or yas::json
.
The YAS_OBJECT()
/YAS_OBJECT_NVP()
/YAS_OBJECT_STRUCT()
/YAS_OBJECT_STRUCT_NVP()
macro are declared here, example use is here.
More examples you can see here.
TODO:
- protobuf/messagepack support
- limits
- objects versioning
Support the project
You can support the YAS project by donating:
- BTC: 12rjx6prAxwJ1Aep6HuM54At9wDvSCDbSJ
- ETH: 0x62719DDEc96C513699a276107622C73F6cAcec47
Serialization for the following types is supported:
- std::array
- std::bitset
- std::chrono::duration
- std::chrono::time_point
- std::complex
- std::deque
- std::forward_list
- std::list
- std::map
- std::multimap
- std::multiset
- std::optional
- std::pair
- std::set
- std::string
- std::string_view
- std::tuple
- std::unordered_map
- std::unordered_multimap
- std::unordered_multiset
- std::unordered_set
- std::variant
- std::vector
- std::wstring
- boost::array
- boost::chrono::duration
- boost::chrono::time_point
- boost::optional
- boost::variant
- boost::container::deque
- boost::container::string
- boost::container::wstring
- boost::container::vector
- boost::container::static_vector
- boost::container::stable_vector
- boost::container::list
- boost::container::slist
- boost::container::map
- boost::container::multimap
- boost::container::set
- boost::container::multiset
- boost::container::flat_map
- boost::container::flat_multimap
- boost::container::flat_set
- boost::container::flat_multiset
- boost::unordered_map
- boost::unordered_multimap
- boost::unordered_set
- boost::unordered_multiset
- boost::fusion::pair
- boost::fusion::tuple
- boost::fusion::vector
- boost::fusion::list
- boost::fusion::map
- boost::fusion::set
- yas::intrusive_buffer (only save)
- yas::shared_buffer
Projects using YAS
- Ufochain: a mimblewimble implementation of crypto currency using X17r algorithm
- Kvant: Kvant - is an original project using the consensus of MimbleWimble, due to which maximum anonymity and security were achieved
- zkPoD-lib: zkPoD-lib is the underlying core library for zkPoD system. It fully implements PoD (proof of delivery) protocol and also provides a CLI interface together with Golang bindings
- Litecash: Litecash is the next generation scalable, confidential cryptocurrency based on an elegant and innovative Mimblewimble protocol
- K3: K3 is a programming language for building large-scale data systems
- vistle: Software Environment for High-Performance Simulation and Parallel Visualization
- LGraph: Live Graph infrastructure for Synthesis and Simulation
- Beam: BEAM is a next generation scalable, confidential cryptocurrency based on an elegant and innovative Mimblewimble protocol
- libfon9: C++11 Cross-platform infrastructure for Order Management System
- iris-crypt: Store Node.js modules encrypted in a package file
- cppan: Class members annotations for C++
- GeekSys company: GeekSys is using YAS to serialize features from images
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].