Function
fromJsonString
(
schema: S,
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
| 12434 | * @since 4.0.0 |
| 12435 | */ |
| 12436 | export function fromJsonString<S extends Constraint>( |
| 12437 | schema: S, |
| 12438 | options?: { |
| 12439 | readonly reviver?: Parameters<typeof JSON.parse>[1] | undefined |
| 12440 | readonly replacer?: SchemaGetter.JsonReplacer | undefined |
| 12441 | readonly space?: Parameters<typeof JSON.stringify>[2] | undefined |
| 12442 | } |
| 12443 | ): fromJsonString<S> { |
| 12444 | return JsonString.pipe(decodeTo(schema, SchemaTransformation.fromJsonString(options))) |
| 12445 | } |
| 12446 | |
| 12447 | /** @internal */ |
| 12448 | export const UnknownFromJsonString: fromJsonString<Unknown> = fromJsonString(Unknown) |
Tested by
no test coverage detected