Sign in

    moonrockz/partiql-value/json does not have a README file

    JsonError

    pub(all) suberror JsonError {
    Utf8
    Syntax(offset~ : Int, message~ : String)
    Unsupported(String)
    Bindings(String)
    } derive(
    Debug
    )

    Errors at the JSON boundary. Syntax offsets count UTF-16 code units from the start of the document. Unsupported values are never replaced by null.

    JsonError::message

    fn JsonError::message(self : JsonError) -> String

    read_bytes

    fn read_bytes(source : BytesView) ->
    Value
    raise JsonError

    Read one strict UTF-8 JSON document. A BOM is not accepted.

    read_text

    fn read_text(source : StringView) ->
    Value
    raise JsonError

    Read exactly one strict JSON document. Integers normalize to Int/BigInt; fractions and exponents become exact Decimal values. Duplicate keys survive. Strings must contain Unicode scalar values; unpaired surrogates are errors. At most 256 nested containers and Int32 decimal exponents are supported.

    write_bytes

    fn write_bytes(value :
    Value
    , pretty? : Bool) -> Bytes raise JsonError

    Write one JSON document as UTF-8, without a BOM or trailing newline.

    write_text

    fn write_text(value :
    Value
    , pretty? : Bool) -> String raise JsonError

    Write one JSON document, without a trailing newline. Duplicate tuple fields are emitted in order. Decimals retain their scale. Finite floats use the shortest round-trippable binary64 spelling; reading it gives Int/Decimal, not Float. Other PartiQL types and non-finite floats raise Unsupported. At most 256 nested containers are supported, matching read_text.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io