cq/README.md

38 lines
569 B
Markdown

# cq usage
```sh
cq < file.cbor
cq [attribute] < file.cbor
```
Example:
```sh
cq ".people.alice.age" < file.cbor
```
# json-to-cbor usage
```sh
json-to-cbor < file.json > file.cbor
```
# hs usage
`hs` stands for `hexstring`.
```sh
hs < file.cbor
```
# string-keys-to-int usage
JSON format has a limitation on the type of hash keys: it has to be a string.
CBOR doesn't come with such limitation.
`string-keys-to-int` automatically converts string keys into integers, whenever all the keys in a hash can be converted.
```sh
string-keys-to-int < file.cbor
```