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

Documentation #4

Open
dredozubov opened this issue Oct 27, 2017 · 5 comments
Open

Documentation #4

dredozubov opened this issue Oct 27, 2017 · 5 comments

Comments

@dredozubov
Copy link
Contributor

Help needed

@sboosali
Copy link

sboosali commented Jan 22, 2018

I can help, but where is the export function? i.e.

export :: JsonRepr x -> ByteString

Data.Schematic.JsonSchema has a deadlink, does Schema have a ToJson itself?

@sboosali
Copy link

We could port their examples, like http://json-schema.org/example2.html

@dredozubov
Copy link
Contributor Author

dredozubov commented Jan 23, 2018

I can help, but where is the export function? i.e.
export :: JsonRepr x -> ByteString
Data.Schematic.JsonSchema has a deadlink, does Schema have a ToJson itself?

@sboosali If you're asking about serializing exported json-schema itself, then it uses Schema type from hjsonschema package to store the schema, you can use it for serialization as is.
If you're asking about schematized json values, then you're looking for JsonRepr schema. It has ToJSON and FromJSON instances as well.

We could port their examples, like http://json-schema.org/example2.html

I like the idea! Would you care to open a PR with it?

@sboosali
Copy link

Oh, it wraps hjsonschema, that makes sense.

Yeah, I can do a PR, but skimming through example and this package yesterday, I thought I noticed something missing; maybe just because draft 7 of json schema added something (I might be wrong, I'll double check, I'll get back to you soon).

Either way, if Example 2 doesn't work, I'll be happy to port the first example or something similar (I'm still new to json schema myself).

@dredozubov
Copy link
Contributor Author

I've created a separate ticket for documenting json-schema related functionality: #7
Let's continue this discussion there.

masaeedu pushed a commit to masaeedu/schematic that referenced this issue Sep 21, 2018
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

2 participants