Skip to content

msgpack::object's stream output format #457

@NorioKobota

Description

@NorioKobota

Hi, maintainers.

This is related to #273

std::map m = {{"key", msgpack::type::nil_t()}};
std::stringstream ss;
msgpack::pack(ss, m);
msgpack::object_handle oh = msgpack::unpack(ss.str().data(), ss.str().size());
std::cout << oh.get() << std::endl;

Above result is {"key":nil}.
I know the differences between nil and null, but unfortunately JSON does not have nil as reserved word.

So I'll be grad if use null instead of nil in operator<< function.

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions