1
1
mirror of https://github.com/wader/fq.git synced 2024-12-26 15:02:28 +03:00
fq/format/asn1/asn1_ber.jq
Mattias Wadman 0829c167cc asn1_ber: Add decoder
Basic support, can also do CER and DER but without any extra validation.
No schema support.

Redo format doc.md usage a bit, now format/<dir>/<format>.md instead.

Related to #20
2022-02-06 22:13:03 +01:00

11 lines
233 B
Plaintext

def _asn1_ber_torepr:
def _f:
if .class == "universal" then
if .tag | . == "sequence" or . == "set" then
.constructed | map(_f)
else .value | tovalue
end
else .constructed | map(_f)
end;
_f;