mirror of
https://github.com/wader/fq.git
synced 2025-01-02 10:36:00 +03:00
a7a101ca67
Also add authors to avro and macho decoders Generated with: for i in $(go run . -r -n '_registry | [([([.files[][].name | split(".")[0]] | unique[]), (.formats[].name)] | count[] | select(.[1] == 2)[0]), (.formats[] | select(.decode_in_arg).name)] | unique[]'); do DIR=$(dirname $(find format -name $i.go)); echo "$ fq -h $i" > "$DIR/testdata/help_$i.fqtest" ; done
26 lines
429 B
Plaintext
26 lines
429 B
Plaintext
$ fq -h bson
|
|
bson: Binary JSON decoder
|
|
|
|
Decode examples
|
|
===============
|
|
|
|
# Decode file as bson
|
|
$ fq -d bson . file
|
|
# Decode value as bson
|
|
... | bson
|
|
|
|
Convert represented value to JSON
|
|
=================================
|
|
|
|
$ fq -d bson torepr file.bson
|
|
|
|
Filter represented value
|
|
========================
|
|
|
|
$ fq -d bson 'torepr | select(.name=="bob")' file.bson
|
|
|
|
References
|
|
==========
|
|
- https://bsonspec.org/spec.html
|
|
|