Skip to content

jsonToDataValue

jsonToDataValue(value): DataValue

Defined in: packages/format-cbor/src/json-bridge.ts:64

Converts a JsonValue to a DataValue, following the non-normative advice in RFC 8949 §6.2.

Integral numbers within -(2^53-1)..2^53-1 (JSON’s safe integer range) become int; all other numbers become float.

JsonValue

DataValue