-
Notifications
You must be signed in to change notification settings - Fork 33
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
Comments
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. |
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? |
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. |
In any case, please tell me if the text linking to your implementation is correct or something should be added/removed. |
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. |
Good idea; done. |
Thanks a lot! |
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.
The text was updated successfully, but these errors were encountered: