Json<A> is a type class to provide toJson and fromJson instances for type A.

Remarks

fromJson throws an exception (most likely JsonError) when it fails.

See

stringify and parseJson for serialization and deserialization

interface Json {
    fromJson: ((arg) => A);
    toJson: ((arg) => Value);
}

Type Parameters

  • A

Properties

Properties

fromJson: ((arg) => A)

Type declaration

    • (arg): A
    • Parameters

      Returns A

toJson: ((arg) => Value)

Type declaration

    • (arg): Value
    • Parameters

      • arg: Readonly<A>

      Returns Value

Generated using TypeDoc