Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collaborate with quicktype? #108

Closed
dvdsgl opened this issue Jan 15, 2018 · 4 comments
Closed

Collaborate with quicktype? #108

dvdsgl opened this issue Jan 15, 2018 · 4 comments
Labels

Comments

@dvdsgl
Copy link

dvdsgl commented Jan 15, 2018

Hi! I have a similar project and am currently working on Objective-C support. Check it out: https://github.com/quicktype/quicktype

We have automated tests, JSON inference in addition to Schema, support for GraphQL queries, an Xcode extension in the App Store, a cross-platform CLI, a web app, and support for 8 output languages.

I would love to find a way to collaborate on at least Objective-C and Swift if you're interested. We use the same license as you, but are implemented in TypeScript.

@dvdsgl
Copy link
Author

dvdsgl commented Jan 15, 2018

At the very least, your users could benefit by using quicktype to infer their schemas from JSON sample data before feeding the schema into Plank.

@rahul-malik
Copy link
Collaborator

@dvdsgl - Hey! Thanks for reaching out. Just looked through Quicktype and there are a lot of similarities in functionality but potentially differences in the output. Plank is intended to create immutable object types regardless of the language but I'm not sure that is the aim of quicktype's generation.

What were you thinking in terms of collaboration? I'd personally like to see Swift support added to Plank in the near future.

@dvdsgl
Copy link
Author

dvdsgl commented Jan 26, 2018

Well, for example, if your user doesn't have a JSON schema but only JSON sample data, you could instruct them to do this:

$ echo '{ "name": "David", "age": 31 }' | quicktype -l schema | plank -o Person.m

quicktype infers the JSON schema from the sample data and pipes to plank to generate models. This assumes you add a -o option to specify the output file, and also requires id to be optional in the schema, as quicktype doesn't include that property (or we could add it to quicktype).

@dvdsgl
Copy link
Author

dvdsgl commented Jan 26, 2018

And as far as our Objective-C models being mutable, this is just a matter of implementation priority (and knowledge), not opinion. Our Swift models are immutable right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants