Package: effect
Module: SchemaGetter
Parses a JSON string into a value.
When to use
Use when you need a schema getter to parse a present encoded JSON string during decoding.
Details
None inputs.reviver: returns Schema.MutableJson (typed JSON).reviver: returns unknown (reviver may produce arbitrary values).SchemaIssue.InvalidValue containing the error message.Example (Parsing JSON)
import { SchemaGetter } from "effect"
const parse = SchemaGetter.parseJson<string>()
// Getter<MutableJson, string>
See
stringifyJson for the inverse operationSignature
declare const parseJson: { <E extends string>(): Getter<Schema.MutableJson, E>; <E extends string>(options: ParseJsonOptions): Getter<unknown, E>; }
Since v4.0.0