{"id":15047126,"url":"https://github.com/nixman/yas","last_synced_at":"2025-05-15T03:05:28.294Z","repository":{"id":3150874,"uuid":"4180706","full_name":"niXman/yas","owner":"niXman","description":"Yet Another Serialization","archived":false,"fork":false,"pushed_at":"2025-02-18T22:59:22.000Z","size":3513,"stargazers_count":759,"open_issues_count":11,"forks_count":102,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-15T03:05:25.515Z","etag":null,"topics":["c-plus-plus","cplusplus","serialization"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niXman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-04-30T07:31:27.000Z","updated_at":"2025-05-14T08:26:06.000Z","dependencies_parsed_at":"2024-10-12T16:01:11.651Z","dependency_job_id":"f4fe5193-21cb-4b69-b915-86d761f093c0","html_url":"https://github.com/niXman/yas","commit_stats":{"total_commits":701,"total_committers":19,"mean_commits":36.89473684210526,"dds":0.6447931526390871,"last_synced_commit":"b1d0519a2d2d52beb4f6b253f0b30f742116cbcb"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niXman%2Fyas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niXman%2Fyas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niXman%2Fyas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niXman%2Fyas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niXman","download_url":"https://codeload.github.com/niXman/yas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264765,"owners_count":22041793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","cplusplus","serialization"],"created_at":"2024-09-24T20:54:38.801Z","updated_at":"2025-05-15T03:05:28.237Z","avatar_url":"https://github.com/niXman.png","language":"C++","readme":"[![CI](https://github.com/niXman/yas/actions/workflows/ci.yml/badge.svg)](https://github.com/niXman/yas/actions/workflows/ci.yml)\n\n# YAS\nYet Another Serialization\n\n-![Time](https://github.com/thekvs/cpp-serializers/raw/master/images/time.png)\n\n* YAS is created as a replacement of [boost.serialization](https://www.boost.org/doc/libs/1_67_0/libs/serialization/doc/index.html) because of its insufficient speed of serialization ([benchmark 1](https://github.com/thekvs/cpp-serializers), [benchmark 2](https://github.com/fraillt/cpp_serializers_benchmark))\n* YAS is header only library\n* YAS does not depend on third-party libraries or boost\n* YAS require C++11 support\n* YAS binary archives is endian independent\n\n## Supported the following types of archives:\n - binary\n - text\n - json (not fully comply)\n\n## Supported the following compilers:\n - GCC  : 4.8.5, ... - 32/64 bit\n - MinGW: 4.8.5, ... - 32/64 bit\n - Clang: 3.5, ... - 32/64 bit\n - Intel: (untested)\n - MSVC : 2017(in c++14 mode), ... - 32/64 bit\n - Emscripten: 1.38 (clang version 6.0.1)\n\n## Samples\nThe easiest way to save and load some object or vars is to use the `yas::save()` and `yas::load()` functions like this:\n```cpp\n#include \u003cyas/serialize.hpp\u003e\n#include \u003cyas/std_types.hpp\u003e\n\nint main() {\n    int a = 3, aa{};\n    short b = 4, bb{};\n    float c = 3.14, cc{};\n    \n    constexpr std::size_t flags = \n         yas::mem // IO type\n        |yas::json; // IO format\n    \n    auto buf = yas::save\u003cflags\u003e(\n        YAS_OBJECT(\"myobject\", a, b, c)\n    );\n    \n    // buf = {\"a\":3,\"b\":4,\"c\":3.14}\n    \n    yas::load\u003cflags\u003e(buf,\n        YAS_OBJECT_NVP(\"myobject\"\n            ,(\"a\", aa)\n            ,(\"b\", bb)\n            ,(\"c\", cc)\n        )\n    );\n    // a == aa \u0026\u0026 b == bb \u0026\u0026 c == cc;\n}\n```\nThe IO type can be one of `yas::mem` or `yas::file`.\nThe IO format can be one of `yas::binary` or `yas::text` or `yas::json`.\n\nThe `YAS_OBJECT()`/`YAS_OBJECT_NVP()`/`YAS_OBJECT_STRUCT()`/`YAS_OBJECT_STRUCT_NVP()` macro are declared [here](https://github.com/niXman/yas/blob/master/include/yas/object.hpp), example use is [here](https://github.com/niXman/yas/blob/master/tests/base/include/yas_object.hpp).\n\nMore examples you can see [here](https://github.com/niXman/yas/blob/master/tests/base/include/serialize.hpp).\n\n## TODO:\n* protobuf/messagepack support\n* limits\n* objects versioning\n\n## Support the project\nYou can support the YAS project by donating:\n* BTC: 12rjx6prAxwJ1Aep6HuM54At9wDvSCDbSJ\n* ETH: 0x62719DDEc96C513699a276107622C73F6cAcec47\n\n## Serialization for the following types is supported:\n - [std::array](https://en.cppreference.com/w/cpp/container/array)\n - [std::bitset](https://en.cppreference.com/w/cpp/utility/bitset)\n - [std::chrono::duration](https://en.cppreference.com/w/cpp/chrono/duration)\n - [std::chrono::time_point](https://en.cppreference.com/w/cpp/chrono/time_point)\n - [std::complex](https://en.cppreference.com/w/cpp/numeric/complex)\n - [std::deque](https://en.cppreference.com/w/cpp/container/deque)\n - [std::forward_list](https://en.cppreference.com/w/cpp/container/forward_list)\n - [std::list](https://en.cppreference.com/w/cpp/container/list)\n - [std::map](https://en.cppreference.com/w/cpp/container/map)\n - [std::multimap](https://en.cppreference.com/w/cpp/container/multimap)\n - [std::multiset](https://en.cppreference.com/w/cpp/container/multiset)\n - [std::optional](https://en.cppreference.com/w/cpp/utility/optional)\n - [std::pair](https://en.cppreference.com/w/cpp/utility/pair)\n - [std::set](https://en.cppreference.com/w/cpp/container/set)\n - [std::string](https://en.cppreference.com/w/cpp/string/basic_string)\n - [std::string_view](https://en.cppreference.com/w/cpp/string/basic_string_view)\n - [std::tuple](https://en.cppreference.com/w/cpp/utility/tuple)\n - [std::unordered_map](https://en.cppreference.com/w/cpp/container/unordered_map)\n - [std::unordered_multimap](https://en.cppreference.com/w/cpp/container/unordered_multimap)\n - [std::unordered_multiset](https://en.cppreference.com/w/cpp/container/unordered_multiset)\n - [std::unordered_set](https://en.cppreference.com/w/cpp/container/unordered_set)\n - [std::variant](https://en.cppreference.com/w/cpp/utility/variant)\n - [std::vector](https://en.cppreference.com/w/cpp/container/vector)\n - [std::wstring](https://en.cppreference.com/w/cpp/string/basic_string)\n - [boost::array](https://www.boost.org/doc/libs/1_64_0/doc/html/array.html)\n - [boost::chrono::duration](https://www.boost.org/doc/libs/1_64_0/doc/html/chrono/reference.html#chrono.reference.cpp0x.duration_hpp.duration)\n - [boost::chrono::time_point](https://www.boost.org/doc/libs/1_64_0/doc/html/chrono/reference.html#chrono.reference.cpp0x.time_point_hpp.time_point)\n - [boost::optional](https://www.boost.org/doc/libs/1_64_0/libs/optional/doc/html/index.html)\n - [boost::variant](https://www.boost.org/doc/libs/1_64_0/doc/html/variant.html)\n - [boost::container::deque](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/deque.html)\n - [boost::container::string](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/basic_string.html)\n - [boost::container::wstring](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/basic_string.html)\n - [boost::container::vector](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/vector.html)\n - [boost::container::static_vector](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/static_vector.html)\n - [boost::container::stable_vector](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/stable_vector.html)\n - [boost::container::list](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/list.html)\n - [boost::container::slist](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/slist.html)\n - [boost::container::map](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/map.html)\n - [boost::container::multimap](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/multimap.html)\n - [boost::container::set](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/set.html)\n - [boost::container::multiset](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/multiset.html)\n - [boost::container::flat_map](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/flat_map.html)\n - [boost::container::flat_multimap](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/flat_multimap.html)\n - [boost::container::flat_set](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/flat_set.html)\n - [boost::container::flat_multiset](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/container/flat_multiset.html)\n - [boost::unordered_map](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/unordered_map.html)\n - [boost::unordered_multimap](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/unordered_multimap.html)\n - [boost::unordered_set](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/unordered_set.html)\n - [boost::unordered_multiset](https://www.boost.org/doc/libs/1_64_0/doc/html/boost/unordered_multiset.html)\n - [boost::fusion::pair](https://www.boost.org/doc/libs/1_64_0/libs/fusion/doc/html/fusion/support/pair.html)\n - [boost::fusion::tuple](https://www.boost.org/doc/libs/1_64_0/libs/fusion/doc/html/fusion/container/tuple.html)\n - [boost::fusion::vector](https://www.boost.org/doc/libs/1_64_0/libs/fusion/doc/html/fusion/container/vector.html)\n - [boost::fusion::list](https://www.boost.org/doc/libs/1_64_0/libs/fusion/doc/html/fusion/container/list.html)\n - [boost::fusion::map](https://www.boost.org/doc/libs/1_64_0/libs/fusion/doc/html/fusion/container/map.html)\n - [boost::fusion::set](https://www.boost.org/doc/libs/1_64_0/libs/fusion/doc/html/fusion/container/set.html)\n - [yas::intrusive_buffer](https://github.com/niXman/yas/blob/master/include/yas/buffers.hpp#L48)\n - [yas::shared_buffer](https://github.com/niXman/yas/blob/master/include/yas/buffers.hpp#L67)\n - [QByteArray](https://doc.qt.io/qt-5/qbytearray.html)\n - [QList](https://doc.qt.io/qt-5/qlist.html)\n - [QMap](https://doc.qt.io/qt-5/qmap.html)\n - [QString](https://doc.qt.io/qt-5/qstring.html)\n - [QStringList](https://doc.qt.io/qt-5/qstringlist.html)\n - [QVector](https://doc.qt.io/qt-5/qvector.html)\n\n## Projects using YAS\n* [Ufochain](https://github.com/ufo-project/ufochain): a mimblewimble implementation of crypto currency using X17r algorithm\n* [Kvant](https://github.com/KVANTdev/KVANT): Kvant - is an original project using the consensus of MimbleWimble, due to which maximum anonymity and security were achieved\n* [zkPoD-lib](https://github.com/sec-bit/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\n* [Litecash](https://github.com/teamlite/litecash): Litecash is the next generation scalable, confidential cryptocurrency based on an elegant and innovative Mimblewimble protocol\n* [K3](https://github.com/DaMSL/K3): K3 is a programming language for building large-scale data systems\n* [vistle](https://github.com/vistle/vistle): Software Environment for High-Performance Simulation and Parallel Visualization\n* [LGraph](https://github.com/masc-ucsc/lgraph): Live Graph infrastructure for Synthesis and Simulation\n* [Beam](https://github.com/BeamWM/beam): BEAM is a next generation scalable, confidential cryptocurrency based on an elegant and innovative Mimblewimble protocol\n* [libfon9](https://github.com/fonwin/libfon9): C++11 Cross-platform infrastructure for Order Management System\n* [iris-crypt](https://github.com/aspectron/iris-crypt): Store Node.js modules encrypted in a package file\n* [cppan](https://github.com/tarasko/cppan): Class members annotations for C++\n* [GeekSys company](http://www.geeksysgroup.com/en/): GeekSys is using YAS to serialize features from images\n","funding_links":[],"categories":["Serialization"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixman%2Fyas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixman%2Fyas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixman%2Fyas/lists"}