Package: effect
Module: SchemaGetter
Encodes a nested object into a URLSearchParams instance using bracket-path notation.
When to use
Use when you need a schema getter to serialize structured data to query parameters for URLs.
Details
The getter is pure and never fails. It flattens nested objects or arrays into
bracket-path keys. Non-object inputs produce an empty URLSearchParams.
Example (Encoding to URLSearchParams)
import { SchemaGetter } from "effect"
const encode = SchemaGetter.encodeURLSearchParams()
// Getter<URLSearchParams, unknown>
See
decodeURLSearchParams for the corresponding decodercollectBracketPathEntries for the underlying flattenerencodeFormData for the FormData variantSignature
declare const encodeURLSearchParams: () => Getter<URLSearchParams, unknown>
Since v4.0.0