Can I generate nested models from JSON?
Yes. The generator supports nested objects and arrays and outputs corresponding nested model definitions.
Convert JSON to TypeScript Effect Schema definitions with nested runtime validation support.
{
"id": 101,
"name": "Ada Lovelace",
"active": true,
"roles": ["admin", "editor"],
"profile": {
"email": "ada@example.com",
"score": 9.8
}
}
import { Schema } from "effect";
export const UserModelSchema = Schema.Struct({
id: Schema.Number,
name: Schema.String,
active: Schema.Boolean
});
Yes. The generator supports nested objects and arrays and outputs corresponding nested model definitions.
Yes. Use the Force Optional toggle in the app toolbar when you need optional fields in the generated output.