-
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
Hex in CBOR #89
Comments
The cbor.me website uses CBOR Diagnostic Notation (Section 8 of RFC 8949), which is an extended form of JSON to represent CBOR data items in a readable form. Another popular text form of JSON data is YAML. It is not necessary to generate such a form to generate CBOR. In Python, you typically use Python notation to build a data item in memory and then convert it using one of the Python libraries, e.g., cbor2. |
ok, but how do I encode something in hex? |
That is a question about your programming language. In Python, there are byte strings in the form of "bytes objects", https://docs.python.org/3/library/stdtypes.html#typebytes. |
Any possible implementation for node js. |
I'm not fluid in nodejs. |
can we use cbor diagnostic notations with that library to encode hex |
As the README says:
|
Hi there!
How to encode a JSON format as following:
Where the field val2 is associated with a hex data.
This doesn't seems to be a correct JSON format, however the web interface is able to convert it to the required CBOR format.
I am unable to use any of the python/JS libs to convert this to CBOR, however the web is able to do so.
What is the correct representation of this format where I want to send a hex value
Regards
The text was updated successfully, but these errors were encountered: