ProductPromotion
Logo

C++ Programming

made by https://0x3d.site

GitHub - niXman/yas: Yet Another Serialization
Yet Another Serialization. Contribute to niXman/yas development by creating an account on GitHub.
Visit Site

GitHub - niXman/yas: Yet Another Serialization

GitHub - niXman/yas: Yet Another Serialization

CI

YAS

Yet Another Serialization

-Time

  • 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:

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

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory