Package: effect
Module: SchemaGetter
Stringifies a present value using JSON.stringify.
When to use
Use when you need a schema getter to serialize a present decoded value to JSON text during encoding.
Details
None inputs.JSON.stringify throws or returns undefined, fails with
SchemaIssue.InvalidValue.replacer and space options, matching
JSON.stringify.Example (Stringifying JSON)
import { SchemaGetter } from "effect"
const stringify = SchemaGetter.stringifyJson()
// Getter<string, unknown>
See
parseJson for the inverse operationSignature
declare const stringifyJson: (options?: StringifyJsonOptions) => Getter<string, unknown>
Since v4.0.0