BC-DCBOR TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Type Alias Simple

    Simple:
        | { type: "False" }
        | { type: "True" }
        | { type: "Null" }
        | { type: "Float"; value: number }

    Represents CBOR simple values (major type 7).

    In CBOR, simple values are a special category that includes booleans (true and false), null, and floating point numbers.

    Per Section 2.4 of the dCBOR specification, only these specific simple values are valid in dCBOR. All other major type 7 values (such as undefined or other simple values) are invalid and will be rejected by dCBOR decoders.

    When encoding floating point values, dCBOR follows specific numeric reduction rules detailed in Section 2.3 of the dCBOR specification, including

    • Integral floating point values must be reduced to integers when possible
    • NaN values must be normalized to the canonical form f97e00