--- id: marshmallow-jsonschema version: "0.16.0" license: MIT License license_treatment: permissive maintenance: active --- # marshmallow-jsonschema — JSON Schema Draft v7 (http://json-schema.org/) formatting with marshmallow License: permissive · Maintenance: active · Downloads: 939.9K/mo ## What it is and what it does marshmallow-jsonschema bridges schema validation and cross-platform form rendering by translating marshmallow schemas into JSON Schema Draft v7 documents. This is useful when you need to validate data or render forms in environments where you cannot import marshmallow—such as web browsers, mobile apps, or API gateways—while keeping your schema definition in one place. The package handles simple fields, nested schemas, arrays, validators (Range, Length, OneOf, Regexp, etc.), and enum fields. It supports recursive schema references and allows customization of the definitions path and field-level metadata. Validators automatically translate to JSON Schema constraints (e.g., validate.Range becomes minimum/maximum), and schema-level metadata like title and description are preserved in the output. Use it for: - Render a marshmallow schema as an interactive form in a web browser or native desktop using json-editor or react-jsonschema-form. - Validate request and response bodies in an API gateway or contract-test layer that consumes JSON Schema directly. - Publish your data schema as documentation alongside an OpenAPI specification. - Translate validation rules from marshmallow into a format consumable by mobile or desktop applications. - Generate JSON Schema for client-side form validation without duplicating schema logic. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts marshmallow schemas into JSON Schema Draft v7 documents, enabling schema validation and form rendering outside Python environments. Yes. The package is actively maintained, has no known vulnerabilities, imposes minimal install friction, and solves a genuine problem: keeping schema definitions in one place while making them available to non-marshmallow consumers. It is well-suited for teams building APIs or multi-platform applications that need consistent validation across environments. ## Install pip install marshmallow-jsonschema uv add marshmallow-jsonschema poetry add marshmallow-jsonschema ## Installing marshmallow-jsonschema Before you install: Low friction: single runtime dependency (marshmallow), pure Python wheel, actively maintained with release within the past 110 days. Requires Python 3.9+ and marshmallow 3.13 or later. License in practice: MIT License (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: from marshmallow import Schema, fields from marshmallow_jsonschema import JSONSchema class UserSchema(Schema): username = fields.String() age = fields.Integer() JSONSchema().dump(UserSchema()) Requires Python 3.9+ and marshmallow 3.13 or later. Verify before relying: - Whether the package handles all marshmallow field types and custom validators beyond those documented in the excerpt. - Performance characteristics when translating large or deeply nested schemas. - Compatibility details with marshmallow 4 beyond the stated 'works on both marshmallow 3 and marshmallow 4'. ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 939.9K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags marshmallow to json schema, schema validation json, json schema generation, marshmallow schema export, form rendering from schema, api schema documentation, cross-platform schema validation, schema-validation, json-schema, serialization [View on SkillFed](https://skillfed.io/packages/marshmallow-jsonschema) · [View on PyPI](https://pypi.org/project/marshmallow-jsonschema/)