Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msgpack::object's stream output format #457

Closed
NorioKobota opened this issue Apr 13, 2016 · 2 comments
Closed

msgpack::object's stream output format #457

NorioKobota opened this issue Apr 13, 2016 · 2 comments

Comments

@NorioKobota
Copy link

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.

@redboltz
Copy link
Contributor

@NorioKobota , thank you for reporting the issue. I will replace nil with null for JSON output.

redboltz added a commit that referenced this issue Apr 17, 2016
@redboltz
Copy link
Contributor

merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants