seisei_schema 0.1.0-dev.1 copy "seisei_schema: ^0.1.0-dev.1" to clipboard
seisei_schema: ^0.1.0-dev.1 copied to clipboard

Structured output schemas and validation helpers for Seisei.

seisei_schema #

Structured output schemas and validation helpers for Seisei.

This package validates JSON-compatible model output before application code decodes it into typed Dart values. It currently provides a flat object-schema contract with string, integer, number, boolean, array, and optional fields.

const schema = ObjectSchema(
  name: 'Draft',
  fields: {
    'title': ObjectField.string(),
    'count': ObjectField.integer(),
    'published': ObjectField.boolean(),
    'tags': ObjectField.string(isArray: true, isRequired: false),
  },
);

final title = schema.decode(rawJson, (object) {
  return object['title']! as String;
});
0
likes
0
points
155
downloads

Publisher

verified publisherjha.sh

Weekly Downloads

Structured output schemas and validation helpers for Seisei.

Repository (GitHub)
View/report issues

Topics

#ai #dart #json-schema #structured-output #validation

License

unknown (license)

Dependencies

seisei

More

Packages that depend on seisei_schema