2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d json . /test.json
|
2021-09-16 23:40:03 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 19:24:49 +03:00
|
|
|
0x00|7b 0a 20 20 20 20 22 61 22 3a 20 31 32 33 2c 0a|{. "a": 123,.|.: {} (json)
|
2021-09-06 12:06:06 +03:00
|
|
|
* |until 0x74.7 (end) (117) | |
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d json tovalue /test.json
|
2020-06-08 03:29:51 +03:00
|
|
|
{
|
|
|
|
"a": 123,
|
|
|
|
"b": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"c:": "string",
|
|
|
|
"d": null,
|
|
|
|
"e": 123.4
|
|
|
|
}
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq . /test.json
|
2021-09-16 23:40:03 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 19:24:49 +03:00
|
|
|
0x00|7b 0a 20 20 20 20 22 61 22 3a 20 31 32 33 2c 0a|{. "a": 123,.|.: {} (json)
|
2021-09-06 12:06:06 +03:00
|
|
|
* |until 0x74.7 (end) (117) | |
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq .b[1] /test.json
|
2020-06-08 03:29:51 +03:00
|
|
|
2
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq . /json.gz
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: /json.gz (gzip)
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|1f 8b |.. | identification: raw bits (valid)
|
2021-11-05 19:24:49 +03:00
|
|
|
0x00| 08 | . | compression_method: "deflate" (8)
|
2021-12-08 18:20:37 +03:00
|
|
|
0x00| 00 | . | flags{}:
|
2022-05-07 14:13:37 +03:00
|
|
|
0x00| 65 0a 08 61 | e..a | mtime: 1627916901 (2021-08-02T15:08:21Z)
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| 00 | . | extra_flags: 0
|
2022-04-05 14:57:55 +03:00
|
|
|
0x00| 03 | . | os: "unix" (3)
|
2021-11-24 17:25:27 +03:00
|
|
|
0x0|7b 22 61 22 3a 20 31 32 33 7d 0a| |{"a": 123}.| | uncompressed: {} (json)
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| ab 56 4a 54 b2 52| .VJT.R| compressed: raw bits
|
2020-06-08 03:29:51 +03:00
|
|
|
0x10|30 34 32 ae e5 02 00 |042.... |
|
2021-11-24 13:15:42 +03:00
|
|
|
0x10| 20 ac d2 9c | ... | crc32: 0x9cd2ac20 (valid)
|
2020-06-08 03:29:51 +03:00
|
|
|
0x10| 0b 00 00 00| | ....|| isize: 11
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq tovalue /json.gz
|
2020-06-08 03:29:51 +03:00
|
|
|
{
|
2021-08-12 02:35:40 +03:00
|
|
|
"compressed": "<13>q1ZKVLJSMDQyruUCAA==",
|
2021-11-05 19:24:49 +03:00
|
|
|
"compression_method": "deflate",
|
2021-11-24 13:15:42 +03:00
|
|
|
"crc32": 2631052320,
|
2021-11-05 17:04:26 +03:00
|
|
|
"extra_flags": 0,
|
2020-06-08 03:29:51 +03:00
|
|
|
"flags": {
|
|
|
|
"comment": false,
|
|
|
|
"extra": false,
|
|
|
|
"header_crc": false,
|
|
|
|
"name": false,
|
|
|
|
"reserved": 0,
|
|
|
|
"text": false
|
|
|
|
},
|
2021-11-05 17:04:26 +03:00
|
|
|
"identification": "<2>H4s=",
|
2020-06-08 03:29:51 +03:00
|
|
|
"isize": 11,
|
|
|
|
"mtime": 1627916901,
|
2022-04-05 14:57:55 +03:00
|
|
|
"os": "unix",
|
2020-06-08 03:29:51 +03:00
|
|
|
"uncompressed": {
|
|
|
|
"a": 123
|
|
|
|
}
|
|
|
|
}
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq .uncompressed /json.gz
|
2021-09-16 23:40:03 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-24 17:25:27 +03:00
|
|
|
0x0|7b 22 61 22 3a 20 31 32 33 7d 0a| |{"a": 123}.| |.uncompressed: {} (json)
|