Convert between bitmark, JSON, and the mapped markup formats (html/xml/…) —
the single string-based conversion surface.
The markup formats need a wasm variant built with markup; on
bitmark-json they throw an unsupported error.
Performance: inputFormat defaults to "auto", which detects the format
by scanning the input for a bitmark bit header — for non-bitmark input
that is a full pass over the whole input before parsing starts, and the
detection is heuristic (markup formats are never auto-detected). If you
know the input format, set inputFormat explicitly. For typed objects
use bitmarkToObjects / objectsToBitmark, which pin their
formats.
Convert between bitmark, JSON, and the mapped markup formats (html/xml/…) — the single string-based conversion surface.
The markup formats need a wasm variant built with
markup; onbitmark-jsonthey throw anunsupportederror.Performance:
inputFormatdefaults to"auto", which detects the format by scanning the input for a bitmark bit header — for non-bitmark input that is a full pass over the whole input before parsing starts, and the detection is heuristic (markup formats are never auto-detected). If you know the input format, setinputFormatexplicitly. For typed objects use bitmarkToObjects / objectsToBitmark, which pin their formats.