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

Question: #7

Open
gogocurtis opened this issue Apr 5, 2017 · 2 comments
Open

Question: #7

gogocurtis opened this issue Apr 5, 2017 · 2 comments

Comments

@gogocurtis
Copy link

This is interesting..

My intuition tells me that there should be some way to take a JsonSchema and end up with a decoder that generates a Type derived from the JsonSchema...

Is this the intention of the project or is it planned for doing validations on the api separate from the payload decode?

@jwoudenberg
Copy link
Contributor

You mean take a normal JSON schema and decode it into an elm-schema? Definitely! @norpan laid down the foundation for that in #5. Check #3 for an idea of what this could be used for and #6 for some progress on supporting additional schema's.

Or are you talking about taking a schema and generation a decoder, elm code to decode such a schema? That could be a really interesting application too!

@norpan
Copy link
Contributor

norpan commented Apr 5, 2017

My intention is not to make types from schemas, maybe check out https://github.com/eeue56/json-to-elm for that.

I'm going to use this to make forms from schemas and validate them, using the Value type internally in the forms. I have user specified data (specified by writing JSON schemas) in a RethinkDB database that I want to offer forms to edit.

And yes, that includes forms to edit the JSON schema itself, maybe using the JSON schema schema :)

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

No branches or pull requests

3 participants