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

JSON for Modern C++ 2.0.9 supports CBOR #25

Closed
nlohmann opened this issue Dec 16, 2016 · 7 comments
Closed

JSON for Modern C++ 2.0.9 supports CBOR #25

nlohmann opened this issue Dec 16, 2016 · 7 comments

Comments

@nlohmann
Copy link

The latest release of JSON for Modern C++ - a header-only C++ library that aims to promote JSON to a first-class data type in C++11 - now supports CBOR as (de)serialization format.

Examples for the usage:

It would be great if you could list us in the implementation section of your website. Furthermore, any feedback is greatly appreciated.

@cabo
Copy link
Contributor

cabo commented Apr 6, 2017

Thank you for the pointer!

Do you plan to implement any of the parts of CBOR where the generic data model extends that of JSON? E.g., byte strings, non-text-string map keys, tags, simple values beyond null/false/true?

It would be nice to use your library to implement COSE and CWTs.

@nlohmann
Copy link
Author

nlohmann commented Apr 6, 2017

Currently, there is no support beyond JSON planned. We allow any JSON value to be serialized to CBOR and to deserialized them again. There was some discussion regarding byte strings, but we decided not to implement different encoding schemes.

May I ask what COSE and CWTs are?

@cabo
Copy link
Contributor

cabo commented Apr 6, 2017

COSE is CBOR Object Signing and Encryption (as with JOSE, but benefitting from the more extensive generic data model of CBOR). CWTs are JWTs using COSE. COSE is pretty much done in the IETF (RFC soon; see https://tools.ietf.org/html/draft-ietf-cose-msg-24 for now); CWTs still require a little bit of work. These structures are the basis of secure low-resource IoT.

@cabo
Copy link
Contributor

cabo commented Apr 11, 2017

In any case, please tell me if the text linking to your implementation is correct or something should be added/removed.

@cabo cabo closed this as completed Apr 11, 2017
@nlohmann
Copy link
Author

You could link to https://github.com/nlohmann/json when mentioning the name "JSON for Modern C++" and to https://github.com/nlohmann/json#binary-formats-cbor-and-messagepack with the "Details" button.

@cabo
Copy link
Contributor

cabo commented Apr 12, 2017

Good idea; done.

@nlohmann
Copy link
Author

Thanks a lot!

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