mirror of
https://github.com/wader/fq.git
synced 2024-12-29 16:42:06 +03:00
Merge pull request #636 from wader/msgpack-more-tests
msgpack: Add str, array and object type tests
This commit is contained in:
commit
22ab56164c
273
format/msgpack/testdata/arrays.fqtest
vendored
Normal file
273
format/msgpack/testdata/arrays.fqtest
vendored
Normal file
@ -0,0 +1,273 @@
|
|||||||
|
# fq -n '[(0,1,4,8,16,17) as $s | [range($s) | "a"]]' | json2msgpack > arrays.msgpack
|
||||||
|
$ fq -d msgpack 'dv,torepr' arrays.msgpack
|
||||||
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: arrays.msgpack (msgpack) 0x0-0x66.7 (103)
|
||||||
|
0x00|96 |. | type: "fixarray" (0x96) 0x0-0x0.7 (1)
|
||||||
|
0x00|96 |. | length: 6 0x0.4-0x0.7 (0.4)
|
||||||
|
| | | elements[0:6]: 0x1-0x66.7 (102)
|
||||||
|
| | | [0]{}: element 0x1-0x1.7 (1)
|
||||||
|
0x00| 90 | . | type: "fixarray" (0x90) 0x1-0x1.7 (1)
|
||||||
|
0x00| 90 | . | length: 0 0x1.4-0x1.7 (0.4)
|
||||||
|
| | | elements[0:0]: 0x2-NA (0)
|
||||||
|
| | | [1]{}: element 0x2-0x4.7 (3)
|
||||||
|
0x00| 91 | . | type: "fixarray" (0x91) 0x2-0x2.7 (1)
|
||||||
|
0x00| 91 | . | length: 1 0x2.4-0x2.7 (0.4)
|
||||||
|
| | | elements[0:1]: 0x3-0x4.7 (2)
|
||||||
|
| | | [0]{}: element 0x3-0x4.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0x3-0x3.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0x3.3-0x3.7 (0.5)
|
||||||
|
0x00| 61 | a | value: "a" 0x4-0x4.7 (1)
|
||||||
|
| | | [2]{}: element 0x5-0xd.7 (9)
|
||||||
|
0x00| 94 | . | type: "fixarray" (0x94) 0x5-0x5.7 (1)
|
||||||
|
0x00| 94 | . | length: 4 0x5.4-0x5.7 (0.4)
|
||||||
|
| | | elements[0:4]: 0x6-0xd.7 (8)
|
||||||
|
| | | [0]{}: element 0x6-0x7.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0x6-0x6.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0x6.3-0x6.7 (0.5)
|
||||||
|
0x00| 61 | a | value: "a" 0x7-0x7.7 (1)
|
||||||
|
| | | [1]{}: element 0x8-0x9.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0x8-0x8.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0x8.3-0x8.7 (0.5)
|
||||||
|
0x00| 61 | a | value: "a" 0x9-0x9.7 (1)
|
||||||
|
| | | [2]{}: element 0xa-0xb.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0xa-0xa.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0xa.3-0xa.7 (0.5)
|
||||||
|
0x00| 61 | a | value: "a" 0xb-0xb.7 (1)
|
||||||
|
| | | [3]{}: element 0xc-0xd.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0xc-0xc.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0xc.3-0xc.7 (0.5)
|
||||||
|
0x00| 61 | a | value: "a" 0xd-0xd.7 (1)
|
||||||
|
| | | [3]{}: element 0xe-0x1e.7 (17)
|
||||||
|
0x00| 98 | . | type: "fixarray" (0x98) 0xe-0xe.7 (1)
|
||||||
|
0x00| 98 | . | length: 8 0xe.4-0xe.7 (0.4)
|
||||||
|
| | | elements[0:8]: 0xf-0x1e.7 (16)
|
||||||
|
| | | [0]{}: element 0xf-0x10.7 (2)
|
||||||
|
0x00| a1| .| type: "fixstr" (0xa1) 0xf-0xf.7 (1)
|
||||||
|
0x00| a1| .| length: 1 0xf.3-0xf.7 (0.5)
|
||||||
|
0x10|61 |a | value: "a" 0x10-0x10.7 (1)
|
||||||
|
| | | [1]{}: element 0x11-0x12.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x11-0x11.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x11.3-0x11.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x12-0x12.7 (1)
|
||||||
|
| | | [2]{}: element 0x13-0x14.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x13-0x13.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x13.3-0x13.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x14-0x14.7 (1)
|
||||||
|
| | | [3]{}: element 0x15-0x16.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x15-0x15.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x15.3-0x15.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x16-0x16.7 (1)
|
||||||
|
| | | [4]{}: element 0x17-0x18.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x17-0x17.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x17.3-0x17.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x18-0x18.7 (1)
|
||||||
|
| | | [5]{}: element 0x19-0x1a.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x19-0x19.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x19.3-0x19.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x1a-0x1a.7 (1)
|
||||||
|
| | | [6]{}: element 0x1b-0x1c.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x1b-0x1b.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x1b.3-0x1b.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x1c-0x1c.7 (1)
|
||||||
|
| | | [7]{}: element 0x1d-0x1e.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x1d-0x1d.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x1d.3-0x1d.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x1e-0x1e.7 (1)
|
||||||
|
| | | [4]{}: element 0x1f-0x41.7 (35)
|
||||||
|
0x10| dc| .| type: "array16" (0xdc) 0x1f-0x1f.7 (1)
|
||||||
|
0x20|00 10 |.. | length: 16 0x20-0x21.7 (2)
|
||||||
|
| | | elements[0:16]: 0x22-0x41.7 (32)
|
||||||
|
| | | [0]{}: element 0x22-0x23.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x22-0x22.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x22.3-0x22.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x23-0x23.7 (1)
|
||||||
|
| | | [1]{}: element 0x24-0x25.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x24-0x24.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x24.3-0x24.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x25-0x25.7 (1)
|
||||||
|
| | | [2]{}: element 0x26-0x27.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x26-0x26.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x26.3-0x26.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x27-0x27.7 (1)
|
||||||
|
| | | [3]{}: element 0x28-0x29.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x28-0x28.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x28.3-0x28.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x29-0x29.7 (1)
|
||||||
|
| | | [4]{}: element 0x2a-0x2b.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x2a-0x2a.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x2a.3-0x2a.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x2b-0x2b.7 (1)
|
||||||
|
| | | [5]{}: element 0x2c-0x2d.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x2c-0x2c.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x2c.3-0x2c.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x2d-0x2d.7 (1)
|
||||||
|
| | | [6]{}: element 0x2e-0x2f.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x2e-0x2e.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x2e.3-0x2e.7 (0.5)
|
||||||
|
0x20| 61| a| value: "a" 0x2f-0x2f.7 (1)
|
||||||
|
| | | [7]{}: element 0x30-0x31.7 (2)
|
||||||
|
0x30|a1 |. | type: "fixstr" (0xa1) 0x30-0x30.7 (1)
|
||||||
|
0x30|a1 |. | length: 1 0x30.3-0x30.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x31-0x31.7 (1)
|
||||||
|
| | | [8]{}: element 0x32-0x33.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x32-0x32.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x32.3-0x32.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x33-0x33.7 (1)
|
||||||
|
| | | [9]{}: element 0x34-0x35.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x34-0x34.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x34.3-0x34.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x35-0x35.7 (1)
|
||||||
|
| | | [10]{}: element 0x36-0x37.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x36-0x36.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x36.3-0x36.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x37-0x37.7 (1)
|
||||||
|
| | | [11]{}: element 0x38-0x39.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x38-0x38.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x38.3-0x38.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x39-0x39.7 (1)
|
||||||
|
| | | [12]{}: element 0x3a-0x3b.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x3a-0x3a.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x3a.3-0x3a.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x3b-0x3b.7 (1)
|
||||||
|
| | | [13]{}: element 0x3c-0x3d.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x3c-0x3c.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x3c.3-0x3c.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x3d-0x3d.7 (1)
|
||||||
|
| | | [14]{}: element 0x3e-0x3f.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x3e-0x3e.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x3e.3-0x3e.7 (0.5)
|
||||||
|
0x30| 61| a| value: "a" 0x3f-0x3f.7 (1)
|
||||||
|
| | | [15]{}: element 0x40-0x41.7 (2)
|
||||||
|
0x40|a1 |. | type: "fixstr" (0xa1) 0x40-0x40.7 (1)
|
||||||
|
0x40|a1 |. | length: 1 0x40.3-0x40.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x41-0x41.7 (1)
|
||||||
|
| | | [5]{}: element 0x42-0x66.7 (37)
|
||||||
|
0x40| dc | . | type: "array16" (0xdc) 0x42-0x42.7 (1)
|
||||||
|
0x40| 00 11 | .. | length: 17 0x43-0x44.7 (2)
|
||||||
|
| | | elements[0:17]: 0x45-0x66.7 (34)
|
||||||
|
| | | [0]{}: element 0x45-0x46.7 (2)
|
||||||
|
0x40| a1 | . | type: "fixstr" (0xa1) 0x45-0x45.7 (1)
|
||||||
|
0x40| a1 | . | length: 1 0x45.3-0x45.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x46-0x46.7 (1)
|
||||||
|
| | | [1]{}: element 0x47-0x48.7 (2)
|
||||||
|
0x40| a1 | . | type: "fixstr" (0xa1) 0x47-0x47.7 (1)
|
||||||
|
0x40| a1 | . | length: 1 0x47.3-0x47.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x48-0x48.7 (1)
|
||||||
|
| | | [2]{}: element 0x49-0x4a.7 (2)
|
||||||
|
0x40| a1 | . | type: "fixstr" (0xa1) 0x49-0x49.7 (1)
|
||||||
|
0x40| a1 | . | length: 1 0x49.3-0x49.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x4a-0x4a.7 (1)
|
||||||
|
| | | [3]{}: element 0x4b-0x4c.7 (2)
|
||||||
|
0x40| a1 | . | type: "fixstr" (0xa1) 0x4b-0x4b.7 (1)
|
||||||
|
0x40| a1 | . | length: 1 0x4b.3-0x4b.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x4c-0x4c.7 (1)
|
||||||
|
| | | [4]{}: element 0x4d-0x4e.7 (2)
|
||||||
|
0x40| a1 | . | type: "fixstr" (0xa1) 0x4d-0x4d.7 (1)
|
||||||
|
0x40| a1 | . | length: 1 0x4d.3-0x4d.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x4e-0x4e.7 (1)
|
||||||
|
| | | [5]{}: element 0x4f-0x50.7 (2)
|
||||||
|
0x40| a1| .| type: "fixstr" (0xa1) 0x4f-0x4f.7 (1)
|
||||||
|
0x40| a1| .| length: 1 0x4f.3-0x4f.7 (0.5)
|
||||||
|
0x50|61 |a | value: "a" 0x50-0x50.7 (1)
|
||||||
|
| | | [6]{}: element 0x51-0x52.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x51-0x51.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x51.3-0x51.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x52-0x52.7 (1)
|
||||||
|
| | | [7]{}: element 0x53-0x54.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x53-0x53.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x53.3-0x53.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x54-0x54.7 (1)
|
||||||
|
| | | [8]{}: element 0x55-0x56.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x55-0x55.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x55.3-0x55.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x56-0x56.7 (1)
|
||||||
|
| | | [9]{}: element 0x57-0x58.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x57-0x57.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x57.3-0x57.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x58-0x58.7 (1)
|
||||||
|
| | | [10]{}: element 0x59-0x5a.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x59-0x59.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x59.3-0x59.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x5a-0x5a.7 (1)
|
||||||
|
| | | [11]{}: element 0x5b-0x5c.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x5b-0x5b.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x5b.3-0x5b.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x5c-0x5c.7 (1)
|
||||||
|
| | | [12]{}: element 0x5d-0x5e.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x5d-0x5d.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x5d.3-0x5d.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x5e-0x5e.7 (1)
|
||||||
|
| | | [13]{}: element 0x5f-0x60.7 (2)
|
||||||
|
0x50| a1| .| type: "fixstr" (0xa1) 0x5f-0x5f.7 (1)
|
||||||
|
0x50| a1| .| length: 1 0x5f.3-0x5f.7 (0.5)
|
||||||
|
0x60|61 |a | value: "a" 0x60-0x60.7 (1)
|
||||||
|
| | | [14]{}: element 0x61-0x62.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x61-0x61.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x61.3-0x61.7 (0.5)
|
||||||
|
0x60| 61 | a | value: "a" 0x62-0x62.7 (1)
|
||||||
|
| | | [15]{}: element 0x63-0x64.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x63-0x63.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x63.3-0x63.7 (0.5)
|
||||||
|
0x60| 61 | a | value: "a" 0x64-0x64.7 (1)
|
||||||
|
| | | [16]{}: element 0x65-0x66.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x65-0x65.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x65.3-0x65.7 (0.5)
|
||||||
|
0x60| 61| | a| | value: "a" 0x66-0x66.7 (1)
|
||||||
|
[
|
||||||
|
[],
|
||||||
|
[
|
||||||
|
"a"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a",
|
||||||
|
"a"
|
||||||
|
]
|
||||||
|
]
|
BIN
format/msgpack/testdata/arrays.msgpack
vendored
Normal file
BIN
format/msgpack/testdata/arrays.msgpack
vendored
Normal file
Binary file not shown.
8
format/msgpack/testdata/fixstr.fqtest
vendored
8
format/msgpack/testdata/fixstr.fqtest
vendored
@ -1,8 +0,0 @@
|
|||||||
# Msgpack: fixstr gets wrong length
|
|
||||||
# https://github.com/wader/fq/issues/634
|
|
||||||
$ fq -n '"b3737472696e67206f66206c656e677468203139" | from_hex | msgpack | dv'
|
|
||||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (msgpack) 0x0-0x13.7 (20)
|
|
||||||
0x00|b3 |. | type: "fixstr" (0xb3) 0x0-0x0.7 (1)
|
|
||||||
0x00|b3 |. | length: 19 0x0.3-0x0.7 (0.5)
|
|
||||||
0x00| 73 74 72 69 6e 67 20 6f 66 20 6c 65 6e 67 74| string of lengt| value: "string of length 19" 0x1-0x13.7 (19)
|
|
||||||
0x10|68 20 31 39| |h 19| |
|
|
30
format/msgpack/testdata/ints.fqtest
vendored
30
format/msgpack/testdata/ints.fqtest
vendored
@ -1,5 +1,5 @@
|
|||||||
# fq -n '[0,1,2,3,4,5,6,7,8,9,127,128,-1,-2,-3,-4,-5,-6,-7,-8,-31,-32,0xffff_ffff,-0xffff_ffff,0x7fff_ffff,-0x7fff_ffff]' | json2msgpack > ints.msgpack
|
# fq -n '[0,1,2,3,4,5,6,7,8,9,127,128,-1,-2,-3,-4,-5,-6,-7,-8,-31,-32,0xffff_ffff,-0xffff_ffff,0x7fff_ffff,-0x7fff_ffff]' | json2msgpack > ints.msgpack
|
||||||
$ fq -d msgpack dv ints.msgpack
|
$ fq -d msgpack 'dv,torepr' ints.msgpack
|
||||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: ints.msgpack (msgpack) 0x0-0x31.7 (50)
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: ints.msgpack (msgpack) 0x0-0x31.7 (50)
|
||||||
0x00|dc |. | type: "array16" (0xdc) 0x0-0x0.7 (1)
|
0x00|dc |. | type: "array16" (0xdc) 0x0-0x0.7 (1)
|
||||||
0x00| 00 1a | .. | length: 26 0x1-0x2.7 (2)
|
0x00| 00 1a | .. | length: 26 0x1-0x2.7 (2)
|
||||||
@ -83,6 +83,34 @@ $ fq -d msgpack dv ints.msgpack
|
|||||||
0x20| d2 | . | type: "int32" (0xd2) 0x2d-0x2d.7 (1)
|
0x20| d2 | . | type: "int32" (0xd2) 0x2d-0x2d.7 (1)
|
||||||
0x20| 80 00| ..| value: -2147483647 0x2e-0x31.7 (4)
|
0x20| 80 00| ..| value: -2147483647 0x2e-0x31.7 (4)
|
||||||
0x30|00 01| |..| |
|
0x30|00 01| |..| |
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
7,
|
||||||
|
8,
|
||||||
|
9,
|
||||||
|
127,
|
||||||
|
128,
|
||||||
|
-1,
|
||||||
|
-2,
|
||||||
|
-3,
|
||||||
|
-4,
|
||||||
|
-5,
|
||||||
|
-6,
|
||||||
|
-7,
|
||||||
|
-8,
|
||||||
|
-31,
|
||||||
|
-32,
|
||||||
|
4294967295,
|
||||||
|
-4294967295,
|
||||||
|
2147483647,
|
||||||
|
-2147483647
|
||||||
|
]
|
||||||
$ fq -d msgpack torepr ints.msgpack
|
$ fq -d msgpack torepr ints.msgpack
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
|
504
format/msgpack/testdata/objects.fqtest
vendored
Normal file
504
format/msgpack/testdata/objects.fqtest
vendored
Normal file
@ -0,0 +1,504 @@
|
|||||||
|
# fq -n '[(0,1,4,8,16,17) as $s | [range($s) as $k | {key: ($k | tostring), value: "a"}] | from_entries]' | json2msgpack > objects.msgpack
|
||||||
|
$ fq -d msgpack 'dv,torepr' objects.msgpack
|
||||||
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: objects.msgpack (msgpack) 0x0-0xcf.7 (208)
|
||||||
|
0x00|96 |. | type: "fixarray" (0x96) 0x0-0x0.7 (1)
|
||||||
|
0x00|96 |. | length: 6 0x0.4-0x0.7 (0.4)
|
||||||
|
| | | elements[0:6]: 0x1-0xcf.7 (207)
|
||||||
|
| | | [0]{}: element 0x1-0x1.7 (1)
|
||||||
|
0x00| 80 | . | type: "fixmap" (0x80) 0x1-0x1.7 (1)
|
||||||
|
0x00| 80 | . | length: 0 0x1.4-0x1.7 (0.4)
|
||||||
|
| | | pairs[0:0]: 0x2-NA (0)
|
||||||
|
| | | [1]{}: element 0x2-0x6.7 (5)
|
||||||
|
0x00| 81 | . | type: "fixmap" (0x81) 0x2-0x2.7 (1)
|
||||||
|
0x00| 81 | . | length: 1 0x2.4-0x2.7 (0.4)
|
||||||
|
| | | pairs[0:1]: 0x3-0x6.7 (4)
|
||||||
|
| | | [0]{}: pair 0x3-0x6.7 (4)
|
||||||
|
| | | key{}: 0x3-0x4.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0x3-0x3.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0x3.3-0x3.7 (0.5)
|
||||||
|
0x00| 30 | 0 | value: "0" 0x4-0x4.7 (1)
|
||||||
|
| | | value{}: 0x5-0x6.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0x5-0x5.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0x5.3-0x5.7 (0.5)
|
||||||
|
0x00| 61 | a | value: "a" 0x6-0x6.7 (1)
|
||||||
|
| | | [2]{}: element 0x7-0x17.7 (17)
|
||||||
|
0x00| 84 | . | type: "fixmap" (0x84) 0x7-0x7.7 (1)
|
||||||
|
0x00| 84 | . | length: 4 0x7.4-0x7.7 (0.4)
|
||||||
|
| | | pairs[0:4]: 0x8-0x17.7 (16)
|
||||||
|
| | | [0]{}: pair 0x8-0xb.7 (4)
|
||||||
|
| | | key{}: 0x8-0x9.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0x8-0x8.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0x8.3-0x8.7 (0.5)
|
||||||
|
0x00| 30 | 0 | value: "0" 0x9-0x9.7 (1)
|
||||||
|
| | | value{}: 0xa-0xb.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0xa-0xa.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0xa.3-0xa.7 (0.5)
|
||||||
|
0x00| 61 | a | value: "a" 0xb-0xb.7 (1)
|
||||||
|
| | | [1]{}: pair 0xc-0xf.7 (4)
|
||||||
|
| | | key{}: 0xc-0xd.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0xc-0xc.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0xc.3-0xc.7 (0.5)
|
||||||
|
0x00| 31 | 1 | value: "1" 0xd-0xd.7 (1)
|
||||||
|
| | | value{}: 0xe-0xf.7 (2)
|
||||||
|
0x00| a1 | . | type: "fixstr" (0xa1) 0xe-0xe.7 (1)
|
||||||
|
0x00| a1 | . | length: 1 0xe.3-0xe.7 (0.5)
|
||||||
|
0x00| 61| a| value: "a" 0xf-0xf.7 (1)
|
||||||
|
| | | [2]{}: pair 0x10-0x13.7 (4)
|
||||||
|
| | | key{}: 0x10-0x11.7 (2)
|
||||||
|
0x10|a1 |. | type: "fixstr" (0xa1) 0x10-0x10.7 (1)
|
||||||
|
0x10|a1 |. | length: 1 0x10.3-0x10.7 (0.5)
|
||||||
|
0x10| 32 | 2 | value: "2" 0x11-0x11.7 (1)
|
||||||
|
| | | value{}: 0x12-0x13.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x12-0x12.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x12.3-0x12.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x13-0x13.7 (1)
|
||||||
|
| | | [3]{}: pair 0x14-0x17.7 (4)
|
||||||
|
| | | key{}: 0x14-0x15.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x14-0x14.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x14.3-0x14.7 (0.5)
|
||||||
|
0x10| 33 | 3 | value: "3" 0x15-0x15.7 (1)
|
||||||
|
| | | value{}: 0x16-0x17.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x16-0x16.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x16.3-0x16.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x17-0x17.7 (1)
|
||||||
|
| | | [3]{}: element 0x18-0x38.7 (33)
|
||||||
|
0x10| 88 | . | type: "fixmap" (0x88) 0x18-0x18.7 (1)
|
||||||
|
0x10| 88 | . | length: 8 0x18.4-0x18.7 (0.4)
|
||||||
|
| | | pairs[0:8]: 0x19-0x38.7 (32)
|
||||||
|
| | | [0]{}: pair 0x19-0x1c.7 (4)
|
||||||
|
| | | key{}: 0x19-0x1a.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x19-0x19.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x19.3-0x19.7 (0.5)
|
||||||
|
0x10| 30 | 0 | value: "0" 0x1a-0x1a.7 (1)
|
||||||
|
| | | value{}: 0x1b-0x1c.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x1b-0x1b.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x1b.3-0x1b.7 (0.5)
|
||||||
|
0x10| 61 | a | value: "a" 0x1c-0x1c.7 (1)
|
||||||
|
| | | [1]{}: pair 0x1d-0x20.7 (4)
|
||||||
|
| | | key{}: 0x1d-0x1e.7 (2)
|
||||||
|
0x10| a1 | . | type: "fixstr" (0xa1) 0x1d-0x1d.7 (1)
|
||||||
|
0x10| a1 | . | length: 1 0x1d.3-0x1d.7 (0.5)
|
||||||
|
0x10| 31 | 1 | value: "1" 0x1e-0x1e.7 (1)
|
||||||
|
| | | value{}: 0x1f-0x20.7 (2)
|
||||||
|
0x10| a1| .| type: "fixstr" (0xa1) 0x1f-0x1f.7 (1)
|
||||||
|
0x10| a1| .| length: 1 0x1f.3-0x1f.7 (0.5)
|
||||||
|
0x20|61 |a | value: "a" 0x20-0x20.7 (1)
|
||||||
|
| | | [2]{}: pair 0x21-0x24.7 (4)
|
||||||
|
| | | key{}: 0x21-0x22.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x21-0x21.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x21.3-0x21.7 (0.5)
|
||||||
|
0x20| 32 | 2 | value: "2" 0x22-0x22.7 (1)
|
||||||
|
| | | value{}: 0x23-0x24.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x23-0x23.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x23.3-0x23.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x24-0x24.7 (1)
|
||||||
|
| | | [3]{}: pair 0x25-0x28.7 (4)
|
||||||
|
| | | key{}: 0x25-0x26.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x25-0x25.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x25.3-0x25.7 (0.5)
|
||||||
|
0x20| 33 | 3 | value: "3" 0x26-0x26.7 (1)
|
||||||
|
| | | value{}: 0x27-0x28.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x27-0x27.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x27.3-0x27.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x28-0x28.7 (1)
|
||||||
|
| | | [4]{}: pair 0x29-0x2c.7 (4)
|
||||||
|
| | | key{}: 0x29-0x2a.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x29-0x29.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x29.3-0x29.7 (0.5)
|
||||||
|
0x20| 34 | 4 | value: "4" 0x2a-0x2a.7 (1)
|
||||||
|
| | | value{}: 0x2b-0x2c.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x2b-0x2b.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x2b.3-0x2b.7 (0.5)
|
||||||
|
0x20| 61 | a | value: "a" 0x2c-0x2c.7 (1)
|
||||||
|
| | | [5]{}: pair 0x2d-0x30.7 (4)
|
||||||
|
| | | key{}: 0x2d-0x2e.7 (2)
|
||||||
|
0x20| a1 | . | type: "fixstr" (0xa1) 0x2d-0x2d.7 (1)
|
||||||
|
0x20| a1 | . | length: 1 0x2d.3-0x2d.7 (0.5)
|
||||||
|
0x20| 35 | 5 | value: "5" 0x2e-0x2e.7 (1)
|
||||||
|
| | | value{}: 0x2f-0x30.7 (2)
|
||||||
|
0x20| a1| .| type: "fixstr" (0xa1) 0x2f-0x2f.7 (1)
|
||||||
|
0x20| a1| .| length: 1 0x2f.3-0x2f.7 (0.5)
|
||||||
|
0x30|61 |a | value: "a" 0x30-0x30.7 (1)
|
||||||
|
| | | [6]{}: pair 0x31-0x34.7 (4)
|
||||||
|
| | | key{}: 0x31-0x32.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x31-0x31.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x31.3-0x31.7 (0.5)
|
||||||
|
0x30| 36 | 6 | value: "6" 0x32-0x32.7 (1)
|
||||||
|
| | | value{}: 0x33-0x34.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x33-0x33.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x33.3-0x33.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x34-0x34.7 (1)
|
||||||
|
| | | [7]{}: pair 0x35-0x38.7 (4)
|
||||||
|
| | | key{}: 0x35-0x36.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x35-0x35.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x35.3-0x35.7 (0.5)
|
||||||
|
0x30| 37 | 7 | value: "7" 0x36-0x36.7 (1)
|
||||||
|
| | | value{}: 0x37-0x38.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x37-0x37.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x37.3-0x37.7 (0.5)
|
||||||
|
0x30| 61 | a | value: "a" 0x38-0x38.7 (1)
|
||||||
|
| | | [4]{}: element 0x39-0x81.7 (73)
|
||||||
|
0x30| de | . | type: "map16" (0xde) 0x39-0x39.7 (1)
|
||||||
|
0x30| 00 10 | .. | length: 16 0x3a-0x3b.7 (2)
|
||||||
|
| | | pairs[0:16]: 0x3c-0x81.7 (70)
|
||||||
|
| | | [0]{}: pair 0x3c-0x3f.7 (4)
|
||||||
|
| | | key{}: 0x3c-0x3d.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x3c-0x3c.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x3c.3-0x3c.7 (0.5)
|
||||||
|
0x30| 30 | 0 | value: "0" 0x3d-0x3d.7 (1)
|
||||||
|
| | | value{}: 0x3e-0x3f.7 (2)
|
||||||
|
0x30| a1 | . | type: "fixstr" (0xa1) 0x3e-0x3e.7 (1)
|
||||||
|
0x30| a1 | . | length: 1 0x3e.3-0x3e.7 (0.5)
|
||||||
|
0x30| 61| a| value: "a" 0x3f-0x3f.7 (1)
|
||||||
|
| | | [1]{}: pair 0x40-0x43.7 (4)
|
||||||
|
| | | key{}: 0x40-0x41.7 (2)
|
||||||
|
0x40|a1 |. | type: "fixstr" (0xa1) 0x40-0x40.7 (1)
|
||||||
|
0x40|a1 |. | length: 1 0x40.3-0x40.7 (0.5)
|
||||||
|
0x40| 31 | 1 | value: "1" 0x41-0x41.7 (1)
|
||||||
|
| | | value{}: 0x42-0x43.7 (2)
|
||||||
|
0x40| a1 | . | type: "fixstr" (0xa1) 0x42-0x42.7 (1)
|
||||||
|
0x40| a1 | . | length: 1 0x42.3-0x42.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x43-0x43.7 (1)
|
||||||
|
| | | [2]{}: pair 0x44-0x48.7 (5)
|
||||||
|
| | | key{}: 0x44-0x46.7 (3)
|
||||||
|
0x40| a2 | . | type: "fixstr" (0xa2) 0x44-0x44.7 (1)
|
||||||
|
0x40| a2 | . | length: 2 0x44.3-0x44.7 (0.5)
|
||||||
|
0x40| 31 30 | 10 | value: "10" 0x45-0x46.7 (2)
|
||||||
|
| | | value{}: 0x47-0x48.7 (2)
|
||||||
|
0x40| a1 | . | type: "fixstr" (0xa1) 0x47-0x47.7 (1)
|
||||||
|
0x40| a1 | . | length: 1 0x47.3-0x47.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x48-0x48.7 (1)
|
||||||
|
| | | [3]{}: pair 0x49-0x4d.7 (5)
|
||||||
|
| | | key{}: 0x49-0x4b.7 (3)
|
||||||
|
0x40| a2 | . | type: "fixstr" (0xa2) 0x49-0x49.7 (1)
|
||||||
|
0x40| a2 | . | length: 2 0x49.3-0x49.7 (0.5)
|
||||||
|
0x40| 31 31 | 11 | value: "11" 0x4a-0x4b.7 (2)
|
||||||
|
| | | value{}: 0x4c-0x4d.7 (2)
|
||||||
|
0x40| a1 | . | type: "fixstr" (0xa1) 0x4c-0x4c.7 (1)
|
||||||
|
0x40| a1 | . | length: 1 0x4c.3-0x4c.7 (0.5)
|
||||||
|
0x40| 61 | a | value: "a" 0x4d-0x4d.7 (1)
|
||||||
|
| | | [4]{}: pair 0x4e-0x52.7 (5)
|
||||||
|
| | | key{}: 0x4e-0x50.7 (3)
|
||||||
|
0x40| a2 | . | type: "fixstr" (0xa2) 0x4e-0x4e.7 (1)
|
||||||
|
0x40| a2 | . | length: 2 0x4e.3-0x4e.7 (0.5)
|
||||||
|
0x40| 31| 1| value: "12" 0x4f-0x50.7 (2)
|
||||||
|
0x50|32 |2 |
|
||||||
|
| | | value{}: 0x51-0x52.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x51-0x51.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x51.3-0x51.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x52-0x52.7 (1)
|
||||||
|
| | | [5]{}: pair 0x53-0x57.7 (5)
|
||||||
|
| | | key{}: 0x53-0x55.7 (3)
|
||||||
|
0x50| a2 | . | type: "fixstr" (0xa2) 0x53-0x53.7 (1)
|
||||||
|
0x50| a2 | . | length: 2 0x53.3-0x53.7 (0.5)
|
||||||
|
0x50| 31 33 | 13 | value: "13" 0x54-0x55.7 (2)
|
||||||
|
| | | value{}: 0x56-0x57.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x56-0x56.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x56.3-0x56.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x57-0x57.7 (1)
|
||||||
|
| | | [6]{}: pair 0x58-0x5c.7 (5)
|
||||||
|
| | | key{}: 0x58-0x5a.7 (3)
|
||||||
|
0x50| a2 | . | type: "fixstr" (0xa2) 0x58-0x58.7 (1)
|
||||||
|
0x50| a2 | . | length: 2 0x58.3-0x58.7 (0.5)
|
||||||
|
0x50| 31 34 | 14 | value: "14" 0x59-0x5a.7 (2)
|
||||||
|
| | | value{}: 0x5b-0x5c.7 (2)
|
||||||
|
0x50| a1 | . | type: "fixstr" (0xa1) 0x5b-0x5b.7 (1)
|
||||||
|
0x50| a1 | . | length: 1 0x5b.3-0x5b.7 (0.5)
|
||||||
|
0x50| 61 | a | value: "a" 0x5c-0x5c.7 (1)
|
||||||
|
| | | [7]{}: pair 0x5d-0x61.7 (5)
|
||||||
|
| | | key{}: 0x5d-0x5f.7 (3)
|
||||||
|
0x50| a2 | . | type: "fixstr" (0xa2) 0x5d-0x5d.7 (1)
|
||||||
|
0x50| a2 | . | length: 2 0x5d.3-0x5d.7 (0.5)
|
||||||
|
0x50| 31 35| 15| value: "15" 0x5e-0x5f.7 (2)
|
||||||
|
| | | value{}: 0x60-0x61.7 (2)
|
||||||
|
0x60|a1 |. | type: "fixstr" (0xa1) 0x60-0x60.7 (1)
|
||||||
|
0x60|a1 |. | length: 1 0x60.3-0x60.7 (0.5)
|
||||||
|
0x60| 61 | a | value: "a" 0x61-0x61.7 (1)
|
||||||
|
| | | [8]{}: pair 0x62-0x65.7 (4)
|
||||||
|
| | | key{}: 0x62-0x63.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x62-0x62.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x62.3-0x62.7 (0.5)
|
||||||
|
0x60| 32 | 2 | value: "2" 0x63-0x63.7 (1)
|
||||||
|
| | | value{}: 0x64-0x65.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x64-0x64.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x64.3-0x64.7 (0.5)
|
||||||
|
0x60| 61 | a | value: "a" 0x65-0x65.7 (1)
|
||||||
|
| | | [9]{}: pair 0x66-0x69.7 (4)
|
||||||
|
| | | key{}: 0x66-0x67.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x66-0x66.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x66.3-0x66.7 (0.5)
|
||||||
|
0x60| 33 | 3 | value: "3" 0x67-0x67.7 (1)
|
||||||
|
| | | value{}: 0x68-0x69.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x68-0x68.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x68.3-0x68.7 (0.5)
|
||||||
|
0x60| 61 | a | value: "a" 0x69-0x69.7 (1)
|
||||||
|
| | | [10]{}: pair 0x6a-0x6d.7 (4)
|
||||||
|
| | | key{}: 0x6a-0x6b.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x6a-0x6a.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x6a.3-0x6a.7 (0.5)
|
||||||
|
0x60| 34 | 4 | value: "4" 0x6b-0x6b.7 (1)
|
||||||
|
| | | value{}: 0x6c-0x6d.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x6c-0x6c.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x6c.3-0x6c.7 (0.5)
|
||||||
|
0x60| 61 | a | value: "a" 0x6d-0x6d.7 (1)
|
||||||
|
| | | [11]{}: pair 0x6e-0x71.7 (4)
|
||||||
|
| | | key{}: 0x6e-0x6f.7 (2)
|
||||||
|
0x60| a1 | . | type: "fixstr" (0xa1) 0x6e-0x6e.7 (1)
|
||||||
|
0x60| a1 | . | length: 1 0x6e.3-0x6e.7 (0.5)
|
||||||
|
0x60| 35| 5| value: "5" 0x6f-0x6f.7 (1)
|
||||||
|
| | | value{}: 0x70-0x71.7 (2)
|
||||||
|
0x70|a1 |. | type: "fixstr" (0xa1) 0x70-0x70.7 (1)
|
||||||
|
0x70|a1 |. | length: 1 0x70.3-0x70.7 (0.5)
|
||||||
|
0x70| 61 | a | value: "a" 0x71-0x71.7 (1)
|
||||||
|
| | | [12]{}: pair 0x72-0x75.7 (4)
|
||||||
|
| | | key{}: 0x72-0x73.7 (2)
|
||||||
|
0x70| a1 | . | type: "fixstr" (0xa1) 0x72-0x72.7 (1)
|
||||||
|
0x70| a1 | . | length: 1 0x72.3-0x72.7 (0.5)
|
||||||
|
0x70| 36 | 6 | value: "6" 0x73-0x73.7 (1)
|
||||||
|
| | | value{}: 0x74-0x75.7 (2)
|
||||||
|
0x70| a1 | . | type: "fixstr" (0xa1) 0x74-0x74.7 (1)
|
||||||
|
0x70| a1 | . | length: 1 0x74.3-0x74.7 (0.5)
|
||||||
|
0x70| 61 | a | value: "a" 0x75-0x75.7 (1)
|
||||||
|
| | | [13]{}: pair 0x76-0x79.7 (4)
|
||||||
|
| | | key{}: 0x76-0x77.7 (2)
|
||||||
|
0x70| a1 | . | type: "fixstr" (0xa1) 0x76-0x76.7 (1)
|
||||||
|
0x70| a1 | . | length: 1 0x76.3-0x76.7 (0.5)
|
||||||
|
0x70| 37 | 7 | value: "7" 0x77-0x77.7 (1)
|
||||||
|
| | | value{}: 0x78-0x79.7 (2)
|
||||||
|
0x70| a1 | . | type: "fixstr" (0xa1) 0x78-0x78.7 (1)
|
||||||
|
0x70| a1 | . | length: 1 0x78.3-0x78.7 (0.5)
|
||||||
|
0x70| 61 | a | value: "a" 0x79-0x79.7 (1)
|
||||||
|
| | | [14]{}: pair 0x7a-0x7d.7 (4)
|
||||||
|
| | | key{}: 0x7a-0x7b.7 (2)
|
||||||
|
0x70| a1 | . | type: "fixstr" (0xa1) 0x7a-0x7a.7 (1)
|
||||||
|
0x70| a1 | . | length: 1 0x7a.3-0x7a.7 (0.5)
|
||||||
|
0x70| 38 | 8 | value: "8" 0x7b-0x7b.7 (1)
|
||||||
|
| | | value{}: 0x7c-0x7d.7 (2)
|
||||||
|
0x70| a1 | . | type: "fixstr" (0xa1) 0x7c-0x7c.7 (1)
|
||||||
|
0x70| a1 | . | length: 1 0x7c.3-0x7c.7 (0.5)
|
||||||
|
0x70| 61 | a | value: "a" 0x7d-0x7d.7 (1)
|
||||||
|
| | | [15]{}: pair 0x7e-0x81.7 (4)
|
||||||
|
| | | key{}: 0x7e-0x7f.7 (2)
|
||||||
|
0x70| a1 | . | type: "fixstr" (0xa1) 0x7e-0x7e.7 (1)
|
||||||
|
0x70| a1 | . | length: 1 0x7e.3-0x7e.7 (0.5)
|
||||||
|
0x70| 39| 9| value: "9" 0x7f-0x7f.7 (1)
|
||||||
|
| | | value{}: 0x80-0x81.7 (2)
|
||||||
|
0x80|a1 |. | type: "fixstr" (0xa1) 0x80-0x80.7 (1)
|
||||||
|
0x80|a1 |. | length: 1 0x80.3-0x80.7 (0.5)
|
||||||
|
0x80| 61 | a | value: "a" 0x81-0x81.7 (1)
|
||||||
|
| | | [5]{}: element 0x82-0xcf.7 (78)
|
||||||
|
0x80| de | . | type: "map16" (0xde) 0x82-0x82.7 (1)
|
||||||
|
0x80| 00 11 | .. | length: 17 0x83-0x84.7 (2)
|
||||||
|
| | | pairs[0:17]: 0x85-0xcf.7 (75)
|
||||||
|
| | | [0]{}: pair 0x85-0x88.7 (4)
|
||||||
|
| | | key{}: 0x85-0x86.7 (2)
|
||||||
|
0x80| a1 | . | type: "fixstr" (0xa1) 0x85-0x85.7 (1)
|
||||||
|
0x80| a1 | . | length: 1 0x85.3-0x85.7 (0.5)
|
||||||
|
0x80| 30 | 0 | value: "0" 0x86-0x86.7 (1)
|
||||||
|
| | | value{}: 0x87-0x88.7 (2)
|
||||||
|
0x80| a1 | . | type: "fixstr" (0xa1) 0x87-0x87.7 (1)
|
||||||
|
0x80| a1 | . | length: 1 0x87.3-0x87.7 (0.5)
|
||||||
|
0x80| 61 | a | value: "a" 0x88-0x88.7 (1)
|
||||||
|
| | | [1]{}: pair 0x89-0x8c.7 (4)
|
||||||
|
| | | key{}: 0x89-0x8a.7 (2)
|
||||||
|
0x80| a1 | . | type: "fixstr" (0xa1) 0x89-0x89.7 (1)
|
||||||
|
0x80| a1 | . | length: 1 0x89.3-0x89.7 (0.5)
|
||||||
|
0x80| 31 | 1 | value: "1" 0x8a-0x8a.7 (1)
|
||||||
|
| | | value{}: 0x8b-0x8c.7 (2)
|
||||||
|
0x80| a1 | . | type: "fixstr" (0xa1) 0x8b-0x8b.7 (1)
|
||||||
|
0x80| a1 | . | length: 1 0x8b.3-0x8b.7 (0.5)
|
||||||
|
0x80| 61 | a | value: "a" 0x8c-0x8c.7 (1)
|
||||||
|
| | | [2]{}: pair 0x8d-0x91.7 (5)
|
||||||
|
| | | key{}: 0x8d-0x8f.7 (3)
|
||||||
|
0x80| a2 | . | type: "fixstr" (0xa2) 0x8d-0x8d.7 (1)
|
||||||
|
0x80| a2 | . | length: 2 0x8d.3-0x8d.7 (0.5)
|
||||||
|
0x80| 31 30| 10| value: "10" 0x8e-0x8f.7 (2)
|
||||||
|
| | | value{}: 0x90-0x91.7 (2)
|
||||||
|
0x90|a1 |. | type: "fixstr" (0xa1) 0x90-0x90.7 (1)
|
||||||
|
0x90|a1 |. | length: 1 0x90.3-0x90.7 (0.5)
|
||||||
|
0x90| 61 | a | value: "a" 0x91-0x91.7 (1)
|
||||||
|
| | | [3]{}: pair 0x92-0x96.7 (5)
|
||||||
|
| | | key{}: 0x92-0x94.7 (3)
|
||||||
|
0x90| a2 | . | type: "fixstr" (0xa2) 0x92-0x92.7 (1)
|
||||||
|
0x90| a2 | . | length: 2 0x92.3-0x92.7 (0.5)
|
||||||
|
0x90| 31 31 | 11 | value: "11" 0x93-0x94.7 (2)
|
||||||
|
| | | value{}: 0x95-0x96.7 (2)
|
||||||
|
0x90| a1 | . | type: "fixstr" (0xa1) 0x95-0x95.7 (1)
|
||||||
|
0x90| a1 | . | length: 1 0x95.3-0x95.7 (0.5)
|
||||||
|
0x90| 61 | a | value: "a" 0x96-0x96.7 (1)
|
||||||
|
| | | [4]{}: pair 0x97-0x9b.7 (5)
|
||||||
|
| | | key{}: 0x97-0x99.7 (3)
|
||||||
|
0x90| a2 | . | type: "fixstr" (0xa2) 0x97-0x97.7 (1)
|
||||||
|
0x90| a2 | . | length: 2 0x97.3-0x97.7 (0.5)
|
||||||
|
0x90| 31 32 | 12 | value: "12" 0x98-0x99.7 (2)
|
||||||
|
| | | value{}: 0x9a-0x9b.7 (2)
|
||||||
|
0x90| a1 | . | type: "fixstr" (0xa1) 0x9a-0x9a.7 (1)
|
||||||
|
0x90| a1 | . | length: 1 0x9a.3-0x9a.7 (0.5)
|
||||||
|
0x90| 61 | a | value: "a" 0x9b-0x9b.7 (1)
|
||||||
|
| | | [5]{}: pair 0x9c-0xa0.7 (5)
|
||||||
|
| | | key{}: 0x9c-0x9e.7 (3)
|
||||||
|
0x90| a2 | . | type: "fixstr" (0xa2) 0x9c-0x9c.7 (1)
|
||||||
|
0x90| a2 | . | length: 2 0x9c.3-0x9c.7 (0.5)
|
||||||
|
0x90| 31 33 | 13 | value: "13" 0x9d-0x9e.7 (2)
|
||||||
|
| | | value{}: 0x9f-0xa0.7 (2)
|
||||||
|
0x90| a1| .| type: "fixstr" (0xa1) 0x9f-0x9f.7 (1)
|
||||||
|
0x90| a1| .| length: 1 0x9f.3-0x9f.7 (0.5)
|
||||||
|
0xa0|61 |a | value: "a" 0xa0-0xa0.7 (1)
|
||||||
|
| | | [6]{}: pair 0xa1-0xa5.7 (5)
|
||||||
|
| | | key{}: 0xa1-0xa3.7 (3)
|
||||||
|
0xa0| a2 | . | type: "fixstr" (0xa2) 0xa1-0xa1.7 (1)
|
||||||
|
0xa0| a2 | . | length: 2 0xa1.3-0xa1.7 (0.5)
|
||||||
|
0xa0| 31 34 | 14 | value: "14" 0xa2-0xa3.7 (2)
|
||||||
|
| | | value{}: 0xa4-0xa5.7 (2)
|
||||||
|
0xa0| a1 | . | type: "fixstr" (0xa1) 0xa4-0xa4.7 (1)
|
||||||
|
0xa0| a1 | . | length: 1 0xa4.3-0xa4.7 (0.5)
|
||||||
|
0xa0| 61 | a | value: "a" 0xa5-0xa5.7 (1)
|
||||||
|
| | | [7]{}: pair 0xa6-0xaa.7 (5)
|
||||||
|
| | | key{}: 0xa6-0xa8.7 (3)
|
||||||
|
0xa0| a2 | . | type: "fixstr" (0xa2) 0xa6-0xa6.7 (1)
|
||||||
|
0xa0| a2 | . | length: 2 0xa6.3-0xa6.7 (0.5)
|
||||||
|
0xa0| 31 35 | 15 | value: "15" 0xa7-0xa8.7 (2)
|
||||||
|
| | | value{}: 0xa9-0xaa.7 (2)
|
||||||
|
0xa0| a1 | . | type: "fixstr" (0xa1) 0xa9-0xa9.7 (1)
|
||||||
|
0xa0| a1 | . | length: 1 0xa9.3-0xa9.7 (0.5)
|
||||||
|
0xa0| 61 | a | value: "a" 0xaa-0xaa.7 (1)
|
||||||
|
| | | [8]{}: pair 0xab-0xaf.7 (5)
|
||||||
|
| | | key{}: 0xab-0xad.7 (3)
|
||||||
|
0xa0| a2 | . | type: "fixstr" (0xa2) 0xab-0xab.7 (1)
|
||||||
|
0xa0| a2 | . | length: 2 0xab.3-0xab.7 (0.5)
|
||||||
|
0xa0| 31 36 | 16 | value: "16" 0xac-0xad.7 (2)
|
||||||
|
| | | value{}: 0xae-0xaf.7 (2)
|
||||||
|
0xa0| a1 | . | type: "fixstr" (0xa1) 0xae-0xae.7 (1)
|
||||||
|
0xa0| a1 | . | length: 1 0xae.3-0xae.7 (0.5)
|
||||||
|
0xa0| 61| a| value: "a" 0xaf-0xaf.7 (1)
|
||||||
|
| | | [9]{}: pair 0xb0-0xb3.7 (4)
|
||||||
|
| | | key{}: 0xb0-0xb1.7 (2)
|
||||||
|
0xb0|a1 |. | type: "fixstr" (0xa1) 0xb0-0xb0.7 (1)
|
||||||
|
0xb0|a1 |. | length: 1 0xb0.3-0xb0.7 (0.5)
|
||||||
|
0xb0| 32 | 2 | value: "2" 0xb1-0xb1.7 (1)
|
||||||
|
| | | value{}: 0xb2-0xb3.7 (2)
|
||||||
|
0xb0| a1 | . | type: "fixstr" (0xa1) 0xb2-0xb2.7 (1)
|
||||||
|
0xb0| a1 | . | length: 1 0xb2.3-0xb2.7 (0.5)
|
||||||
|
0xb0| 61 | a | value: "a" 0xb3-0xb3.7 (1)
|
||||||
|
| | | [10]{}: pair 0xb4-0xb7.7 (4)
|
||||||
|
| | | key{}: 0xb4-0xb5.7 (2)
|
||||||
|
0xb0| a1 | . | type: "fixstr" (0xa1) 0xb4-0xb4.7 (1)
|
||||||
|
0xb0| a1 | . | length: 1 0xb4.3-0xb4.7 (0.5)
|
||||||
|
0xb0| 33 | 3 | value: "3" 0xb5-0xb5.7 (1)
|
||||||
|
| | | value{}: 0xb6-0xb7.7 (2)
|
||||||
|
0xb0| a1 | . | type: "fixstr" (0xa1) 0xb6-0xb6.7 (1)
|
||||||
|
0xb0| a1 | . | length: 1 0xb6.3-0xb6.7 (0.5)
|
||||||
|
0xb0| 61 | a | value: "a" 0xb7-0xb7.7 (1)
|
||||||
|
| | | [11]{}: pair 0xb8-0xbb.7 (4)
|
||||||
|
| | | key{}: 0xb8-0xb9.7 (2)
|
||||||
|
0xb0| a1 | . | type: "fixstr" (0xa1) 0xb8-0xb8.7 (1)
|
||||||
|
0xb0| a1 | . | length: 1 0xb8.3-0xb8.7 (0.5)
|
||||||
|
0xb0| 34 | 4 | value: "4" 0xb9-0xb9.7 (1)
|
||||||
|
| | | value{}: 0xba-0xbb.7 (2)
|
||||||
|
0xb0| a1 | . | type: "fixstr" (0xa1) 0xba-0xba.7 (1)
|
||||||
|
0xb0| a1 | . | length: 1 0xba.3-0xba.7 (0.5)
|
||||||
|
0xb0| 61 | a | value: "a" 0xbb-0xbb.7 (1)
|
||||||
|
| | | [12]{}: pair 0xbc-0xbf.7 (4)
|
||||||
|
| | | key{}: 0xbc-0xbd.7 (2)
|
||||||
|
0xb0| a1 | . | type: "fixstr" (0xa1) 0xbc-0xbc.7 (1)
|
||||||
|
0xb0| a1 | . | length: 1 0xbc.3-0xbc.7 (0.5)
|
||||||
|
0xb0| 35 | 5 | value: "5" 0xbd-0xbd.7 (1)
|
||||||
|
| | | value{}: 0xbe-0xbf.7 (2)
|
||||||
|
0xb0| a1 | . | type: "fixstr" (0xa1) 0xbe-0xbe.7 (1)
|
||||||
|
0xb0| a1 | . | length: 1 0xbe.3-0xbe.7 (0.5)
|
||||||
|
0xb0| 61| a| value: "a" 0xbf-0xbf.7 (1)
|
||||||
|
| | | [13]{}: pair 0xc0-0xc3.7 (4)
|
||||||
|
| | | key{}: 0xc0-0xc1.7 (2)
|
||||||
|
0xc0|a1 |. | type: "fixstr" (0xa1) 0xc0-0xc0.7 (1)
|
||||||
|
0xc0|a1 |. | length: 1 0xc0.3-0xc0.7 (0.5)
|
||||||
|
0xc0| 36 | 6 | value: "6" 0xc1-0xc1.7 (1)
|
||||||
|
| | | value{}: 0xc2-0xc3.7 (2)
|
||||||
|
0xc0| a1 | . | type: "fixstr" (0xa1) 0xc2-0xc2.7 (1)
|
||||||
|
0xc0| a1 | . | length: 1 0xc2.3-0xc2.7 (0.5)
|
||||||
|
0xc0| 61 | a | value: "a" 0xc3-0xc3.7 (1)
|
||||||
|
| | | [14]{}: pair 0xc4-0xc7.7 (4)
|
||||||
|
| | | key{}: 0xc4-0xc5.7 (2)
|
||||||
|
0xc0| a1 | . | type: "fixstr" (0xa1) 0xc4-0xc4.7 (1)
|
||||||
|
0xc0| a1 | . | length: 1 0xc4.3-0xc4.7 (0.5)
|
||||||
|
0xc0| 37 | 7 | value: "7" 0xc5-0xc5.7 (1)
|
||||||
|
| | | value{}: 0xc6-0xc7.7 (2)
|
||||||
|
0xc0| a1 | . | type: "fixstr" (0xa1) 0xc6-0xc6.7 (1)
|
||||||
|
0xc0| a1 | . | length: 1 0xc6.3-0xc6.7 (0.5)
|
||||||
|
0xc0| 61 | a | value: "a" 0xc7-0xc7.7 (1)
|
||||||
|
| | | [15]{}: pair 0xc8-0xcb.7 (4)
|
||||||
|
| | | key{}: 0xc8-0xc9.7 (2)
|
||||||
|
0xc0| a1 | . | type: "fixstr" (0xa1) 0xc8-0xc8.7 (1)
|
||||||
|
0xc0| a1 | . | length: 1 0xc8.3-0xc8.7 (0.5)
|
||||||
|
0xc0| 38 | 8 | value: "8" 0xc9-0xc9.7 (1)
|
||||||
|
| | | value{}: 0xca-0xcb.7 (2)
|
||||||
|
0xc0| a1 | . | type: "fixstr" (0xa1) 0xca-0xca.7 (1)
|
||||||
|
0xc0| a1 | . | length: 1 0xca.3-0xca.7 (0.5)
|
||||||
|
0xc0| 61 | a | value: "a" 0xcb-0xcb.7 (1)
|
||||||
|
| | | [16]{}: pair 0xcc-0xcf.7 (4)
|
||||||
|
| | | key{}: 0xcc-0xcd.7 (2)
|
||||||
|
0xc0| a1 | . | type: "fixstr" (0xa1) 0xcc-0xcc.7 (1)
|
||||||
|
0xc0| a1 | . | length: 1 0xcc.3-0xcc.7 (0.5)
|
||||||
|
0xc0| 39 | 9 | value: "9" 0xcd-0xcd.7 (1)
|
||||||
|
| | | value{}: 0xce-0xcf.7 (2)
|
||||||
|
0xc0| a1 | . | type: "fixstr" (0xa1) 0xce-0xce.7 (1)
|
||||||
|
0xc0| a1 | . | length: 1 0xce.3-0xce.7 (0.5)
|
||||||
|
0xc0| 61| a| value: "a" 0xcf-0xcf.7 (1)
|
||||||
|
[
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
"0": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0": "a",
|
||||||
|
"1": "a",
|
||||||
|
"2": "a",
|
||||||
|
"3": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0": "a",
|
||||||
|
"1": "a",
|
||||||
|
"2": "a",
|
||||||
|
"3": "a",
|
||||||
|
"4": "a",
|
||||||
|
"5": "a",
|
||||||
|
"6": "a",
|
||||||
|
"7": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0": "a",
|
||||||
|
"1": "a",
|
||||||
|
"10": "a",
|
||||||
|
"11": "a",
|
||||||
|
"12": "a",
|
||||||
|
"13": "a",
|
||||||
|
"14": "a",
|
||||||
|
"15": "a",
|
||||||
|
"2": "a",
|
||||||
|
"3": "a",
|
||||||
|
"4": "a",
|
||||||
|
"5": "a",
|
||||||
|
"6": "a",
|
||||||
|
"7": "a",
|
||||||
|
"8": "a",
|
||||||
|
"9": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"0": "a",
|
||||||
|
"1": "a",
|
||||||
|
"10": "a",
|
||||||
|
"11": "a",
|
||||||
|
"12": "a",
|
||||||
|
"13": "a",
|
||||||
|
"14": "a",
|
||||||
|
"15": "a",
|
||||||
|
"16": "a",
|
||||||
|
"2": "a",
|
||||||
|
"3": "a",
|
||||||
|
"4": "a",
|
||||||
|
"5": "a",
|
||||||
|
"6": "a",
|
||||||
|
"7": "a",
|
||||||
|
"8": "a",
|
||||||
|
"9": "a"
|
||||||
|
}
|
||||||
|
]
|
BIN
format/msgpack/testdata/objects.msgpack
vendored
Normal file
BIN
format/msgpack/testdata/objects.msgpack
vendored
Normal file
Binary file not shown.
211
format/msgpack/testdata/strs.fqtest
vendored
Normal file
211
format/msgpack/testdata/strs.fqtest
vendored
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
# fq -n '["", "a" * range(1;34)]' | json2msgpack > strs.msgpack
|
||||||
|
$ fq -d msgpack 'dv,torepr' strs.msgpack
|
||||||
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: strs.msgpack (msgpack) 0x0-0x257.7 (600)
|
||||||
|
0x000|dc |. | type: "array16" (0xdc) 0x0-0x0.7 (1)
|
||||||
|
0x000| 00 22 | ." | length: 34 0x1-0x2.7 (2)
|
||||||
|
| | | elements[0:34]: 0x3-0x257.7 (597)
|
||||||
|
| | | [0]{}: element 0x3-0x3.7 (1)
|
||||||
|
0x000| a0 | . | type: "fixstr" (0xa0) 0x3-0x3.7 (1)
|
||||||
|
0x000| a0 | . | length: 0 0x3.3-0x3.7 (0.5)
|
||||||
|
| | | value: "" 0x4-NA (0)
|
||||||
|
| | | [1]{}: element 0x4-0x5.7 (2)
|
||||||
|
0x000| a1 | . | type: "fixstr" (0xa1) 0x4-0x4.7 (1)
|
||||||
|
0x000| a1 | . | length: 1 0x4.3-0x4.7 (0.5)
|
||||||
|
0x000| 61 | a | value: "a" 0x5-0x5.7 (1)
|
||||||
|
| | | [2]{}: element 0x6-0x8.7 (3)
|
||||||
|
0x000| a2 | . | type: "fixstr" (0xa2) 0x6-0x6.7 (1)
|
||||||
|
0x000| a2 | . | length: 2 0x6.3-0x6.7 (0.5)
|
||||||
|
0x000| 61 61 | aa | value: "aa" 0x7-0x8.7 (2)
|
||||||
|
| | | [3]{}: element 0x9-0xc.7 (4)
|
||||||
|
0x000| a3 | . | type: "fixstr" (0xa3) 0x9-0x9.7 (1)
|
||||||
|
0x000| a3 | . | length: 3 0x9.3-0x9.7 (0.5)
|
||||||
|
0x000| 61 61 61 | aaa | value: "aaa" 0xa-0xc.7 (3)
|
||||||
|
| | | [4]{}: element 0xd-0x11.7 (5)
|
||||||
|
0x000| a4 | . | type: "fixstr" (0xa4) 0xd-0xd.7 (1)
|
||||||
|
0x000| a4 | . | length: 4 0xd.3-0xd.7 (0.5)
|
||||||
|
0x000| 61 61| aa| value: "aaaa" 0xe-0x11.7 (4)
|
||||||
|
0x010|61 61 |aa |
|
||||||
|
| | | [5]{}: element 0x12-0x17.7 (6)
|
||||||
|
0x010| a5 | . | type: "fixstr" (0xa5) 0x12-0x12.7 (1)
|
||||||
|
0x010| a5 | . | length: 5 0x12.3-0x12.7 (0.5)
|
||||||
|
0x010| 61 61 61 61 61 | aaaaa | value: "aaaaa" 0x13-0x17.7 (5)
|
||||||
|
| | | [6]{}: element 0x18-0x1e.7 (7)
|
||||||
|
0x010| a6 | . | type: "fixstr" (0xa6) 0x18-0x18.7 (1)
|
||||||
|
0x010| a6 | . | length: 6 0x18.3-0x18.7 (0.5)
|
||||||
|
0x010| 61 61 61 61 61 61 | aaaaaa | value: "aaaaaa" 0x19-0x1e.7 (6)
|
||||||
|
| | | [7]{}: element 0x1f-0x26.7 (8)
|
||||||
|
0x010| a7| .| type: "fixstr" (0xa7) 0x1f-0x1f.7 (1)
|
||||||
|
0x010| a7| .| length: 7 0x1f.3-0x1f.7 (0.5)
|
||||||
|
0x020|61 61 61 61 61 61 61 |aaaaaaa | value: "aaaaaaa" 0x20-0x26.7 (7)
|
||||||
|
| | | [8]{}: element 0x27-0x2f.7 (9)
|
||||||
|
0x020| a8 | . | type: "fixstr" (0xa8) 0x27-0x27.7 (1)
|
||||||
|
0x020| a8 | . | length: 8 0x27.3-0x27.7 (0.5)
|
||||||
|
0x020| 61 61 61 61 61 61 61 61| aaaaaaaa| value: "aaaaaaaa" 0x28-0x2f.7 (8)
|
||||||
|
| | | [9]{}: element 0x30-0x39.7 (10)
|
||||||
|
0x030|a9 |. | type: "fixstr" (0xa9) 0x30-0x30.7 (1)
|
||||||
|
0x030|a9 |. | length: 9 0x30.3-0x30.7 (0.5)
|
||||||
|
0x030| 61 61 61 61 61 61 61 61 61 | aaaaaaaaa | value: "aaaaaaaaa" 0x31-0x39.7 (9)
|
||||||
|
| | | [10]{}: element 0x3a-0x44.7 (11)
|
||||||
|
0x030| aa | . | type: "fixstr" (0xaa) 0x3a-0x3a.7 (1)
|
||||||
|
0x030| aa | . | length: 10 0x3a.3-0x3a.7 (0.5)
|
||||||
|
0x030| 61 61 61 61 61| aaaaa| value: "aaaaaaaaaa" 0x3b-0x44.7 (10)
|
||||||
|
0x040|61 61 61 61 61 |aaaaa |
|
||||||
|
| | | [11]{}: element 0x45-0x50.7 (12)
|
||||||
|
0x040| ab | . | type: "fixstr" (0xab) 0x45-0x45.7 (1)
|
||||||
|
0x040| ab | . | length: 11 0x45.3-0x45.7 (0.5)
|
||||||
|
0x040| 61 61 61 61 61 61 61 61 61 61| aaaaaaaaaa| value: "aaaaaaaaaaa" 0x46-0x50.7 (11)
|
||||||
|
0x050|61 |a |
|
||||||
|
| | | [12]{}: element 0x51-0x5d.7 (13)
|
||||||
|
0x050| ac | . | type: "fixstr" (0xac) 0x51-0x51.7 (1)
|
||||||
|
0x050| ac | . | length: 12 0x51.3-0x51.7 (0.5)
|
||||||
|
0x050| 61 61 61 61 61 61 61 61 61 61 61 61 | aaaaaaaaaaaa | value: "aaaaaaaaaaaa" 0x52-0x5d.7 (12)
|
||||||
|
| | | [13]{}: element 0x5e-0x6b.7 (14)
|
||||||
|
0x050| ad | . | type: "fixstr" (0xad) 0x5e-0x5e.7 (1)
|
||||||
|
0x050| ad | . | length: 13 0x5e.3-0x5e.7 (0.5)
|
||||||
|
0x050| 61| a| value: "aaaaaaaaaaaaa" 0x5f-0x6b.7 (13)
|
||||||
|
0x060|61 61 61 61 61 61 61 61 61 61 61 61 |aaaaaaaaaaaa |
|
||||||
|
| | | [14]{}: element 0x6c-0x7a.7 (15)
|
||||||
|
0x060| ae | . | type: "fixstr" (0xae) 0x6c-0x6c.7 (1)
|
||||||
|
0x060| ae | . | length: 14 0x6c.3-0x6c.7 (0.5)
|
||||||
|
0x060| 61 61 61| aaa| value: "aaaaaaaaaaaaaa" 0x6d-0x7a.7 (14)
|
||||||
|
0x070|61 61 61 61 61 61 61 61 61 61 61 |aaaaaaaaaaa |
|
||||||
|
| | | [15]{}: element 0x7b-0x8a.7 (16)
|
||||||
|
0x070| af | . | type: "fixstr" (0xaf) 0x7b-0x7b.7 (1)
|
||||||
|
0x070| af | . | length: 15 0x7b.3-0x7b.7 (0.5)
|
||||||
|
0x070| 61 61 61 61| aaaa| value: "aaaaaaaaaaaaaaa" 0x7c-0x8a.7 (15)
|
||||||
|
0x080|61 61 61 61 61 61 61 61 61 61 61 |aaaaaaaaaaa |
|
||||||
|
| | | [16]{}: element 0x8b-0x9b.7 (17)
|
||||||
|
0x080| b0 | . | type: "fixstr" (0xb0) 0x8b-0x8b.7 (1)
|
||||||
|
0x080| b0 | . | length: 16 0x8b.3-0x8b.7 (0.5)
|
||||||
|
0x080| 61 61 61 61| aaaa| value: "aaaaaaaaaaaaaaaa" 0x8c-0x9b.7 (16)
|
||||||
|
0x090|61 61 61 61 61 61 61 61 61 61 61 61 |aaaaaaaaaaaa |
|
||||||
|
| | | [17]{}: element 0x9c-0xad.7 (18)
|
||||||
|
0x090| b1 | . | type: "fixstr" (0xb1) 0x9c-0x9c.7 (1)
|
||||||
|
0x090| b1 | . | length: 17 0x9c.3-0x9c.7 (0.5)
|
||||||
|
0x090| 61 61 61| aaa| value: "aaaaaaaaaaaaaaaaa" 0x9d-0xad.7 (17)
|
||||||
|
0x0a0|61 61 61 61 61 61 61 61 61 61 61 61 61 61 |aaaaaaaaaaaaaa |
|
||||||
|
| | | [18]{}: element 0xae-0xc0.7 (19)
|
||||||
|
0x0a0| b2 | . | type: "fixstr" (0xb2) 0xae-0xae.7 (1)
|
||||||
|
0x0a0| b2 | . | length: 18 0xae.3-0xae.7 (0.5)
|
||||||
|
0x0a0| 61| a| value: "aaaaaaaaaaaaaaaaaa" 0xaf-0xc0.7 (18)
|
||||||
|
0x0b0|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x0c0|61 |a |
|
||||||
|
| | | [19]{}: element 0xc1-0xd4.7 (20)
|
||||||
|
0x0c0| b3 | . | type: "fixstr" (0xb3) 0xc1-0xc1.7 (1)
|
||||||
|
0x0c0| b3 | . | length: 19 0xc1.3-0xc1.7 (0.5)
|
||||||
|
0x0c0| 61 61 61 61 61 61 61 61 61 61 61 61 61 61| aaaaaaaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaa" 0xc2-0xd4.7 (19)
|
||||||
|
0x0d0|61 61 61 61 61 |aaaaa |
|
||||||
|
| | | [20]{}: element 0xd5-0xe9.7 (21)
|
||||||
|
0x0d0| b4 | . | type: "fixstr" (0xb4) 0xd5-0xd5.7 (1)
|
||||||
|
0x0d0| b4 | . | length: 20 0xd5.3-0xd5.7 (0.5)
|
||||||
|
0x0d0| 61 61 61 61 61 61 61 61 61 61| aaaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaa" 0xd6-0xe9.7 (20)
|
||||||
|
0x0e0|61 61 61 61 61 61 61 61 61 61 |aaaaaaaaaa |
|
||||||
|
| | | [21]{}: element 0xea-0xff.7 (22)
|
||||||
|
0x0e0| b5 | . | type: "fixstr" (0xb5) 0xea-0xea.7 (1)
|
||||||
|
0x0e0| b5 | . | length: 21 0xea.3-0xea.7 (0.5)
|
||||||
|
0x0e0| 61 61 61 61 61| aaaaa| value: "aaaaaaaaaaaaaaaaaaaaa" 0xeb-0xff.7 (21)
|
||||||
|
0x0f0|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
| | | [22]{}: element 0x100-0x116.7 (23)
|
||||||
|
0x100|b6 |. | type: "fixstr" (0xb6) 0x100-0x100.7 (1)
|
||||||
|
0x100|b6 |. | length: 22 0x100.3-0x100.7 (0.5)
|
||||||
|
0x100| 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61| aaaaaaaaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaa" 0x101-0x116.7 (22)
|
||||||
|
0x110|61 61 61 61 61 61 61 |aaaaaaa |
|
||||||
|
| | | [23]{}: element 0x117-0x12e.7 (24)
|
||||||
|
0x110| b7 | . | type: "fixstr" (0xb7) 0x117-0x117.7 (1)
|
||||||
|
0x110| b7 | . | length: 23 0x117.3-0x117.7 (0.5)
|
||||||
|
0x110| 61 61 61 61 61 61 61 61| aaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaa" 0x118-0x12e.7 (23)
|
||||||
|
0x120|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 |aaaaaaaaaaaaaaa |
|
||||||
|
| | | [24]{}: element 0x12f-0x147.7 (25)
|
||||||
|
0x120| b8| .| type: "fixstr" (0xb8) 0x12f-0x12f.7 (1)
|
||||||
|
0x120| b8| .| length: 24 0x12f.3-0x12f.7 (0.5)
|
||||||
|
0x130|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaa" 0x130-0x147.7 (24)
|
||||||
|
0x140|61 61 61 61 61 61 61 61 |aaaaaaaa |
|
||||||
|
| | | [25]{}: element 0x148-0x161.7 (26)
|
||||||
|
0x140| b9 | . | type: "fixstr" (0xb9) 0x148-0x148.7 (1)
|
||||||
|
0x140| b9 | . | length: 25 0x148.3-0x148.7 (0.5)
|
||||||
|
0x140| 61 61 61 61 61 61 61| aaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaaa" 0x149-0x161.7 (25)
|
||||||
|
0x150|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x160|61 61 |aa |
|
||||||
|
| | | [26]{}: element 0x162-0x17c.7 (27)
|
||||||
|
0x160| ba | . | type: "fixstr" (0xba) 0x162-0x162.7 (1)
|
||||||
|
0x160| ba | . | length: 26 0x162.3-0x162.7 (0.5)
|
||||||
|
0x160| 61 61 61 61 61 61 61 61 61 61 61 61 61| aaaaaaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaaaa" 0x163-0x17c.7 (26)
|
||||||
|
0x170|61 61 61 61 61 61 61 61 61 61 61 61 61 |aaaaaaaaaaaaa |
|
||||||
|
| | | [27]{}: element 0x17d-0x198.7 (28)
|
||||||
|
0x170| bb | . | type: "fixstr" (0xbb) 0x17d-0x17d.7 (1)
|
||||||
|
0x170| bb | . | length: 27 0x17d.3-0x17d.7 (0.5)
|
||||||
|
0x170| 61 61| aa| value: "aaaaaaaaaaaaaaaaaaaaaaaaaaa" 0x17e-0x198.7 (27)
|
||||||
|
0x180|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x190|61 61 61 61 61 61 61 61 61 |aaaaaaaaa |
|
||||||
|
| | | [28]{}: element 0x199-0x1b5.7 (29)
|
||||||
|
0x190| bc | . | type: "fixstr" (0xbc) 0x199-0x199.7 (1)
|
||||||
|
0x190| bc | . | length: 28 0x199.3-0x199.7 (0.5)
|
||||||
|
0x190| 61 61 61 61 61 61| aaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" 0x19a-0x1b5.7 (28)
|
||||||
|
0x1a0|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x1b0|61 61 61 61 61 61 |aaaaaa |
|
||||||
|
| | | [29]{}: element 0x1b6-0x1d3.7 (30)
|
||||||
|
0x1b0| bd | . | type: "fixstr" (0xbd) 0x1b6-0x1b6.7 (1)
|
||||||
|
0x1b0| bd | . | length: 29 0x1b6.3-0x1b6.7 (0.5)
|
||||||
|
0x1b0| 61 61 61 61 61 61 61 61 61| aaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 0x1b7-0x1d3.7 (29)
|
||||||
|
0x1c0|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x1d0|61 61 61 61 |aaaa |
|
||||||
|
| | | [30]{}: element 0x1d4-0x1f2.7 (31)
|
||||||
|
0x1d0| be | . | type: "fixstr" (0xbe) 0x1d4-0x1d4.7 (1)
|
||||||
|
0x1d0| be | . | length: 30 0x1d4.3-0x1d4.7 (0.5)
|
||||||
|
0x1d0| 61 61 61 61 61 61 61 61 61 61 61| aaaaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 0x1d5-0x1f2.7 (30)
|
||||||
|
0x1e0|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x1f0|61 61 61 |aaa |
|
||||||
|
| | | [31]{}: element 0x1f3-0x212.7 (32)
|
||||||
|
0x1f0| bf | . | type: "fixstr" (0xbf) 0x1f3-0x1f3.7 (1)
|
||||||
|
0x1f0| bf | . | length: 31 0x1f3.3-0x1f3.7 (0.5)
|
||||||
|
0x1f0| 61 61 61 61 61 61 61 61 61 61 61 61| aaaaaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 0x1f4-0x212.7 (31)
|
||||||
|
0x200|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x210|61 61 61 |aaa |
|
||||||
|
| | | [32]{}: element 0x213-0x234.7 (34)
|
||||||
|
0x210| d9 | . | type: "str8" (0xd9) 0x213-0x213.7 (1)
|
||||||
|
0x210| 20 | | length: 32 0x214-0x214.7 (1)
|
||||||
|
0x210| 61 61 61 61 61 61 61 61 61 61 61| aaaaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 0x215-0x234.7 (32)
|
||||||
|
0x220|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x230|61 61 61 61 61 |aaaaa |
|
||||||
|
| | | [33]{}: element 0x235-0x257.7 (35)
|
||||||
|
0x230| d9 | . | type: "str8" (0xd9) 0x235-0x235.7 (1)
|
||||||
|
0x230| 21 | ! | length: 33 0x236-0x236.7 (1)
|
||||||
|
0x230| 61 61 61 61 61 61 61 61 61| aaaaaaaaa| value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 0x237-0x257.7 (33)
|
||||||
|
0x240|61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|aaaaaaaaaaaaaaaa|
|
||||||
|
0x250|61 61 61 61 61 61 61 61| |aaaaaaaa| |
|
||||||
|
[
|
||||||
|
"",
|
||||||
|
"a",
|
||||||
|
"aa",
|
||||||
|
"aaa",
|
||||||
|
"aaaa",
|
||||||
|
"aaaaa",
|
||||||
|
"aaaaaa",
|
||||||
|
"aaaaaaa",
|
||||||
|
"aaaaaaaa",
|
||||||
|
"aaaaaaaaa",
|
||||||
|
"aaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||||
|
]
|
BIN
format/msgpack/testdata/strs.msgpack
vendored
Normal file
BIN
format/msgpack/testdata/strs.msgpack
vendored
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
# msgpack-tools
|
# msgpack-tools
|
||||||
# echo '{"array": [1,2,3], "object": {"key": "value"}, "number": 123, "string": "abc", "true": true, "false": false, "null": null}' | json2msgpack > test.msgpack
|
# echo '{"array": [1,2,3], "object": {"key": "value"}, "number": 123, "string": "abc", "true": true, "false": false, "null": null}' | json2msgpack > types.msgpack
|
||||||
$ fq -d msgpack dv test.msgpack
|
$ fq -d msgpack 'dv,torepr' types.msgpack
|
||||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: test.msgpack (msgpack) 0x0-0x42.7 (67)
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: types.msgpack (msgpack) 0x0-0x42.7 (67)
|
||||||
0x00|87 |. | type: "fixmap" (0x87) 0x0-0x0.7 (1)
|
0x00|87 |. | type: "fixmap" (0x87) 0x0-0x0.7 (1)
|
||||||
0x00|87 |. | length: 7 0x0.4-0x0.7 (0.4)
|
0x00|87 |. | length: 7 0x0.4-0x0.7 (0.4)
|
||||||
| | | pairs[0:7]: 0x1-0x42.7 (66)
|
| | | pairs[0:7]: 0x1-0x42.7 (66)
|
||||||
@ -85,7 +85,6 @@ $ fq -d msgpack dv test.msgpack
|
|||||||
| | | value{}: 0x42-0x42.7 (1)
|
| | | value{}: 0x42-0x42.7 (1)
|
||||||
0x40| c0| | .| | type: "nil" (0xc0) 0x42-0x42.7 (1)
|
0x40| c0| | .| | type: "nil" (0xc0) 0x42-0x42.7 (1)
|
||||||
| | | value: null 0x43-NA (0)
|
| | | value: null 0x43-NA (0)
|
||||||
$ fq -d msgpack torepr test.msgpack
|
|
||||||
{
|
{
|
||||||
"array": [
|
"array": [
|
||||||
1,
|
1,
|
Loading…
Reference in New Issue
Block a user