mirror of
https://github.com/wader/fq.git
synced 2024-11-24 11:16:09 +03:00
0b0f28e966
Does not decode sematic tag types Also fixes broken float16 support Fixes #71
14 lines
336 B
Plaintext
14 lines
336 B
Plaintext
def _cbor_torepr:
|
|
def _f:
|
|
( if .major_type == "map" then
|
|
( .pairs
|
|
| map({key: (.key | _f), value: (.value | _f)})
|
|
| from_entries
|
|
)
|
|
elif .major_type == "array" then .elements | map(_f)
|
|
elif .major_type == "bytes" then .value | tostring
|
|
else .value | tovalue
|
|
end
|
|
);
|
|
_f;
|