MCPcopy Create free account
hub / github.com/effect-app/libs / JsonFromString

Function JsonFromString

repos/effect/packages/effect/src/unstable/schema/Model.ts:706–718  ·  view source on GitHub ↗
(
  schema: S
)

Source from the content-addressed store, hash-verified

704 * The "json" variants will use the object schema directly.
705 *
706 * @category schemas
707 * @since 4.0.0
708 */
709export const JsonFromString = <S extends Schema.Top>(
710 schema: S
711): JsonFromString<S> => {
712 const parsed = Schema.fromJsonString(Schema.toCodecJson(schema)) as any
713 return Field({
714 select: parsed,
715 insert: parsed,
716 update: parsed,
717 json: schema,
718 jsonCreate: schema,
719 jsonUpdate: schema
720 })
721}

Callers

nothing calls this directly

Calls 2

FieldFunction · 0.70
toCodecJsonMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…