{"repo":"omissis/go-jsonschema","free":true,"listed":false,"github":"https://github.com/omissis/go-jsonschema","clone":"git clone https://github.com/omissis/go-jsonschema.git","description":"A tool to generate Go data types from JSON Schema definitions.","language":"Go","stars":804,"topics":["golang","go","json-schema","json","codegenerator","code-generation"],"license":"MIT","category":"dev-tools","readme_excerpt":"go-jsonschema is a tool to generate Go data types from JSON Schema definitions. This tool generates Go data types and structs that corresponds to definitions in the schema, along with unmarshalling code that validates the input JSON according to the schema's validation rules. Badges Installing Download : Get a release here. Install from source : To install with Go 1.25+: Install with Brew : To install with Homebrew: Contributing This project makes use of go workspaces in order to ease testing of the generated code during development while keeping the codebase as tidy and maintainable as possible. It's an unusual choice, but it allows to not only test the code-generation logic, but also the generated code itself. Usage At its most basic: This will write a Go source file to standard output, declared under the package main . You can generate code for multiple schemas in one run, optionally writing to different files inside different packages: This will create schema1.go (declared as package myproject ) and stuff/schema2.go (declared as package stuff ). If schema1.json refers to schema2.json or viceversa, the two Go files will import the other depended-on package. Note the flag format: Regenerating tests' golden files It sometimes happen that new features or bug fixes to the library require regenerating the tests' golden files, here's how to do it: Special types In a few cases, special types are used to help with serializing/deserializing data frrom JSON. Namely a custom types is","default_branch":null,"files":null,"tree":[],"storefront":"/r/omissis","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/omissis/go-jsonschema/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}