Skip to content

bonsai-rx/sgen

Repository files navigation

Serializer Generator Tool

Bonsai.Sgen is a code generator tool for the Bonsai programming language. It leverages JSON Schema as a standard to specify record data types, and automatically generates operators to create and manipulate these objects. It builds on top of NJsonSchema by providing further customization of the generated code as well as Bonsai-specific features.

Getting Started

  1. Install Bonsai.Sgen as a local tool:

    dotnet new tool-manifest
    dotnet tool install --local Bonsai.Sgen
  2. Generate YAML or JSON serialization classes from a schema file to your project Extensions folder:

    dotnet bonsai.sgen schema.json -o Extensions --serializer yaml
    dotnet bonsai.sgen schema.json -o Extensions --serializer json
  3. Add the necessary package references to your Extensions.csproj file:

    <PackageReference Include="YamlDotNet" Version="16.3.0" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

Additional Documentation

For additional documentation and examples, refer to the Sgen documentation pages.

Feedback & Contributing

Bonsai.Sgen is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

About

Tool for automatically generating serialization classes from JSON Schema

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages