#include "CBOR/Core.hpp" #include "CBOR/Encoder.hpp" #include #include #include #include int main() { using namespace std::string_view_literals; std::array buffer = {0}; std::vector binData(5, 'g'); CBOR::BasicEncoder enc(buffer); enc.BeginMap(7); enc.Encode("Hello "); enc.Encode("World! "); enc.Encode("Behold by new power! "); enc.Encode("It truly is a sight to see ..."sv); enc.Encode(std::int64_t(1212121212121212)); enc.Encode(binData); enc.Encode("random double"); enc.Encode(420.69); enc.Encode("random float"); enc.Encode(420.69f); enc.Encode("undefined?"); enc.Encode(CBOR::Special::Undefined); enc.Encode("null?"); enc.Encode(CBOR::Special::Null); enc.End(); for (const auto &byte: buffer) { std::print("{:02x} ", byte); } std::println(""); }