a-h / generate

Generates Go (golang) Structs from JSON schema.
MIT License
444 stars 137 forks source link

Yaml ? #21

Open rande opened 7 years ago

rande commented 7 years ago

Hello,

Might be a stupid question ... but why no supporting yaml ? The yaml format is more suitable to handle configuration with comments than json. The json is more suitable for data exchange ...

a-h commented 7 years ago

So you mean to define the JSON Schema as YAML? Yeah that would probably work.

I built the tool simply to reduce the manual effort of converting existing JSON schema into Go structs while I was doing some work with JSON schema and then I've kept it up-to-date when people have found problems.

It's not designed to be like protobufs, swagger.io or anything like that (i.e. define your data types and then build code on that), but if it helps you to add YAML support, go ahead!