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

Function JsonFromString

packages/effect/src/schema/Model.ts:759–771  ·  view source on GitHub ↗
(
  schema: S
)

Source from the content-addressed store, hash-verified

757 * @since 4.0.0
758 */
759export const JsonFromString = <S extends Schema.Top>(
760 schema: S
761): JsonFromString<S> => {
762 const parsed = Schema.fromJsonString(Schema.toCodecJson(schema)) as any
763 return Field({
764 select: parsed,
765 insert: parsed,
766 update: parsed,
767 json: schema,
768 jsonCreate: schema,
769 jsonUpdate: schema
770 })
771}
772
773/**
774 * Variant field type for a branded binary UUID v4 value whose insert variant

Callers

nothing calls this directly

Calls 2

FieldFunction · 0.70
toCodecJsonMethod · 0.65

Tested by

no test coverage detected