Back

#webauthn

1 APIs with this tag

CBOR API

Encode and decode CBOR (RFC 8949, Concise Binary Object Representation) — the IETF-standard binary data format behind COSE, WebAuthn/FIDO2, the EU Digital COVID Certificate, and many IoT and constrained-device protocols. The encode endpoint turns a JSON value into compact, definite-length CBOR, choosing the smallest head for each integer, string, array and map; the decode endpoint parses CBOR back into a JSON value. It implements the spec across all major types — unsigned and negative integers of every width, byte and text strings (including indefinite-length chunked strings), arrays, maps, tags, the simple values false/true/null, and half-, single- and double-precision floats — and rejects trailing or truncated data rather than silently mangling it. Byte strings and any non-UTF-8 text come back losslessly as {"_bytes_hex":"…"}, tags as {"_tag":{"tag":N,"value":…}}, non-finite floats as {"_float":"NaN|Infinity|-Infinity"}, and other simple values as {"_simple":N}, so encode and decode round-trip exactly. Bytes are exchanged as both hex and base64 so they survive any transport. Everything is computed locally and deterministically, so it is instant and private. Ideal for debugging CBOR, COSE and WebAuthn payloads, bridging JSON and CBOR systems, IoT and smart-card pipelines, and teaching the format. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is CBOR specifically; for MessagePack use the MessagePack API, for BitTorrent's Bencode use the Bencode API, for JSON, YAML, TOML or XML use those format APIs, and for base64, hex, URL or HTML encoding use a general encoding API.

api.oanor.com/cbor-api