2.5.7 U64JSON examples

The following table gives some examples of JSON values encoded in U64JSON.

Table 2-3 U64JSON examples

JSON value U64JSON representation
[1,2,3] 0x8000000000000003, 1, 2, 3
["1",2,3] 0xa000000000000005, 3, 0x2000 0000 0000 3101, 2, 3
"abc" 0x2000 0000 6362 6103
"" 0x2000000000000000
"numbyte" 0x6574 7962 6d75 6e07
"numbytes" 0x6574 7962 6d75 6e08, 0x73
0 0
1 1
0xffff ffff ffff ffff

0xffff ffff ffff ffff

This is +264-1, not -1.

-1 0x1fff ffff ffff ffff
0xaabb ccdd eeff 0011 0xc000 0000 0000 0000, 0xaabb ccdd eeff 0011
-0x1234 5678 9012 3456 0xc100 0000 0000 0000, 0xedcb a987 6fed cbaa
{"num":1,"b":2,"c":3}

0xb000 0000 0000 0008, 3, 0x2000 0000 6d75 6e03, 1, 0x2000 0000 0000 6201, 2, 0x2000 0000 0000 6301, 3

Note:

13 JSON tokens (26 chars) translate into 8 uint64_t values (64 bytes) in U64JSON.
Null 0xcd00000000000000
False 0xce00000000000000
True 0xcf00000000000000
Non-ConfidentialPDF file icon PDF version101196_0100_00_en
Copyright © 2018 Arm Limited or its affiliates. All rights reserved.