Tools for defining record data types in the Bonsai visual reactive programming language with JSON Schema. Each type is specified once in a schema, and the generated C# code includes operators to create, serialize and deserialize records of that type in a workflow.
Bonsai.Sgenis a .NET tool that generates C# types and operators from JSON Schema files.bonsai-sgenis a Python package of Pydantic base classes for models that export schemas compatible withBonsai.Sgen. Itsbonsai-sgencommand exports the schemas of a module as JSON Schema files, or generates the C# types directly.
Both packages are released together, and each release of bonsai-sgen matches the release of Bonsai.Sgen with the same version number.
For installation steps, examples and the reference of both packages, refer to the official Bonsai.Sgen documentation.
Bonsai.Sgen and bonsai-sgen are released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.