Skip to content

Reuse memory in to_cbor and to_msgpack functions #476

Description

@a-sv

It would be good to add the implementation of functions for memory reuse purposes:

static void to_cbor(const basic_json& j, std::vector<uint8_t> &result)
{
    result.clear();
    to_cbor_internal(j, result);
}

static void to_msgpack(const basic_json& j, std::vector<uint8_t> &result)
{
    result.clear();
    to_msgpack_internal(j, result);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions