glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL
https://app.quicktype.io
Apache License 2.0
12.42k stars 1.08k forks source link

Zig support #2169

Open ion232 opened 1 year ago

ion232 commented 1 year ago

Zig is a new but increasingly popular language with standard library support for serialisation/deserialisation of json.

Examples can be seen on the Zig lang homepage and here.

I am currently working on a pull request to support this language.

dvdsgl commented 1 year ago

Awesome!

ion232 commented 1 year ago

Update: I've added support for Zig that can handle most cases, but there isn't currently any module that can handle all of them. The std.json module has limited support (e.g. can't handle maps, renaming, etc), so has to be ruled out. The most well-featured json library I've found is getty-zig/json, but it's still missing rename attribute support for enums. I'm currently looking into adding that feature.