Just before I vanish into the holiday break, I bundled up the release of Avrotize 3.0, a major update that introduces support for JSON Structure – a new intermediate schema format that bridges the gap between JSON Schema's familarity and expressiveness and Avro's type safety.
What's JSON Structure?
It's a JSON-based schema format with features Avro doesn't have:
- Discriminated unions with $discriminator
- Schema composition via $offers/$uses
- Validation keywords (minLength, pattern, etc.)
- Type inheritance with $extends
Why does this matter?
You can now convert the structures from OpenAPI specs, JSON Schema, or CDDL directly into production-ready entity classes for C#, Java, Python, Go, TypeScript, Rust, and C++ – without losing type fidelity along the way.
Introducing Structurize
If you're primarily working with JSON Structure and don't need Avro conversions, the structurize package is also available on PyPI. Currently an alias for avrotize, it will become a focused, standalone JSON Structure toolkit in a future release.
📦 pip install structurize
New in Avrotize 3.0:
- 35 new commands (now 62 total)
- OpenAPI 3.x → JSON Structure converter
- Database schema generation for SQL, Cassandra, Kusto, DynamoDB, Elasticsearch, CosmosDB, and more
- C# generators now support MessagePack, Protobuf-net, and CBOR
- Java/TypeScript test instance factories
See it in action
Check out the gallery with well over 100 conversion examples at
– see how schemas from various formats translate into generated code across all supported languages and many database schema dialects.
Key roadmap item for v4: Instance data transcoders; e.g. pipe XML data conforming to to a source XSD into the transcoder and get JSON output that conforms to the JSON Structure schema produced by the schema conversion. (That does largely already work with the code generators that support multiple encodings at the same time, with C# having most options)
📦 pip install avrotize
🔗clemensv/avrotize: Avrotize is a command-line tool for converting data structure definitions between different schema formats, using Apache Avro Schema as the integration schema model.
Happy holidays! 🎅