Effect CommunityEC
Effect Community3y ago
14 replies
firefox

Seriazlizability: converting JSON Schema back to Effect Struct

Is there a way to convert a generated json schema back to an effect struct? I see this from method but does not look like it (basically from==to)?
/**
 * @category JSON Schema
 * @since 1.0.0
 */
export const to = <I, A>(schema: Schema.Schema<I, A>): JsonSchema7Top => goTop(AST.to(schema.ast))

/**
 * @category JSON Schema
 * @since 1.0.0
 */
export const from = <I, A>(schema: Schema.Schema<I, A>): JsonSchema7Top =>
  goTop(AST.from(schema.ast))
Was this page helpful?