
Quicktype – Beautiful types from JSON - mark-probst
https://app.quicktype.io/
======
erydo
Hey, this is really cool! Cross-language validation of data types is such a
pain. This looks really well-done.

------
chrisparton1991
This could be useful as a build tool plugin to generate consistent typings for
frontend and backend code. Of course, using this as a build-time codegen tool
means you can't add any custom annotations or methods etc., so it could be a
bit restrictive for most use cases.

Nice work though!

------
anthonybullard
The only problem I see with this is that it doesn't have support for optional
types. This is nice to be able to distinguish between null/empty fields and
defaults. But this is very nice work regardless and will be useful in.many
people's usecases.

~~~
dvdsgl
Yes, it does have support for optional types. See the evolution fields in the
Pokedex sample! Output in TypeScript or Swift to make this clearer (some
languages don't have built-in types or syntax for nullable types).

------
pedalpete
Looks like a lot of work went into this, at first I didn't understand where it
would be valuable.

Then I clicked on the "multiple" tab, and I kinda get it. Throw a bunch of
data at it and it will build your types.

I've just started using typescript so will give the vscode a go.

~~~
dvdsgl
Awesome! Thanks for trying it out, the VS Code extension is brand new and
we've not had much feedback.

