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

JSON Schema Extraction #3

Open
2 tasks
wires opened this issue Apr 10, 2017 · 0 comments
Open
2 tasks

JSON Schema Extraction #3

wires opened this issue Apr 10, 2017 · 0 comments

Comments

@wires
Copy link
Member

wires commented Apr 10, 2017

From @wires on February 3, 2017 13:29

related to #16

Typedef Purescript Type JSON Value JSON Schema
Product A * B Tuple A B [_, _] { "type": "array , items: [ A, B ]}
Labeled Product a:A * b:B {a::A, b::B} {a:_, b:_} { "type": "object", properties: { a:A, b:B}}
Sum A + B Either A B [k,_] {oneOf: [?,?]}
Labeled Sum a:A + b:B ADT Constructor {a:_} or {b:_} {oneOf: [ {"type": "object",properties: { a:A }}, {"type": "object",properties: { b:B }} ]}
Primitive text String "..." {"type":"string"}
  • extraction to JSON schema
  • ser/deser JSON according to this schema

Copied from original issue: TinkerTravel/tdl#23

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

No branches or pull requests

1 participant