MCPcopy Create free account
hub / github.com/Effect-TS/effect / fromJsonString

Function fromJsonString

packages/effect/src/SchemaTransformation.ts:1672–1681  ·  view source on GitHub ↗
(options?: {
  readonly reviver?: Parameters<typeof JSON.parse>[1] | undefined
  readonly replacer?: SchemaGetter.JsonReplacer | undefined
  readonly space?: Parameters<typeof JSON.stringify>[2] | undefined
})

Source from the content-addressed store, hash-verified

1670 * @since 4.0.0
1671 */
1672export function fromJsonString(options?: {
1673 readonly reviver?: Parameters<typeof JSON.parse>[1] | undefined
1674 readonly replacer?: SchemaGetter.JsonReplacer | undefined
1675 readonly space?: Parameters<typeof JSON.stringify>[2] | undefined
1676}): Transformation<unknown, string> {
1677 return new Transformation(
1678 SchemaGetter.parseJson(options ?? {}),
1679 SchemaGetter.stringifyJson(options)
1680 )
1681}
1682
1683/**
1684 * Decodes a `FormData` instance into a nested record using bracket-path keys and

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected