Parse and translates YAML into a Go struct definition. Check it out!
This project is aimed to provide an online service. In case you need the js library only, click here to download.
In fact, there is already a yaml-to-go tool by mengzhuo, however that project seems abandoned and no longer maintained, so I started my own version.
- The yaml is parsed by js-yaml.
- The script sometimes has to make some assumptions, so give the output a once-over.
- In an array of objects, the generated object will share all properties among them.
- The output is indented, but not formatted. Use
go fmt
!
Contributions are welcome!
The original JSON-to-Go tool is written by Matt Holt.
The Go Gopher is originally by Renee French. This artwork is an adaptation.