You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to test the example cjson2cbor.c. I used cjson.h from https://github.com/DaveGamble/cJSON
and I built the library into the project. If I run this example with the input json_example.cjson:
I note that the hexadecimal numbers are converted in ASCII. For example 61 = a
but A2 should be =ì instead of =?. Same error for 84 and many others numbers.
The text was updated successfully, but these errors were encountered:
I tried to test the example cjson2cbor.c. I used cjson.h from https://github.com/DaveGamble/cJSON
and I built the library into the project. If I run this example with the input json_example.cjson:
{
"a": [1, 2.2, -1, "žluťoučký kůň!!!"],
"b": {
"c": [true, false, null]
}
}
the corresponding output is:
?aa?@
??;vžluťoučký kůň!!!ab?ac????
but verifying with the tool cbor.me I expected something like this:
A2 # map(2)
61 # text(1)
61 # "a"
84 # array(4)
01 # unsigned(1)
FB 400199999999999A # primitive(4612136378390124954)
20 # negative(0)
76 # text(22)
C5BE6C75C5A56F75C48D6BC3BD206BC5AFC588212121 # "\xC5\xBElu\xC5\xA5ou\xC4\x8Dk\xC3\xBD k\xC5\xAF\xC5\x88!!!"
61 # text(1)
62 # "b"
A1 # map(1)
61 # text(1)
63 # "c"
83 # array(3)
F5 # primitive(21)
F4 # primitive(20)
F6 # primitive(22)
I note that the hexadecimal numbers are converted in ASCII. For example 61 = a
but A2 should be =ì instead of =?. Same error for 84 and many others numbers.
The text was updated successfully, but these errors were encountered: