Skip to content

ar90n/msgpack23

Repository files navigation

Build Issues MIT

What is msgpack23 ?

msgpack23 is a tiny MsgPack library for C++23, providing MsgPack parsing and serialization.
This library is forked from msgpack11 to use C++23 features.

Installation

  • Using CMake

      git clone git@github.com:ar90n/msgpack23.git
      mkdir build
      cd build
      cmake ..
      make && make install
    

Example

MsgPack my_msgpack = MsgPack::object {
    { "key1", "value1" },
    { "key2", false },
    { "key3", MsgPack::array { 1, 2, 3 } },
};

//access to elements
std::cout << my_msgpack["key1"].string_value();

//serialize
std::string msgpack_bytes = my_msgpack.dump();

//deserialize
std::string err;
MsgPack des_msgpack = MsgPack::parse(msgpack_bytes, err);

There are more specific examples in example.cpp. Please see it.

Feature

  • Support serialization and deserialization.

Acknowledgement

License

This software is released under the MIT License, see LICENSE.txt.

About

A simple port of msgpack11 from C++11 to C++23 (msgpack.org[C++23])

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •