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

Improvements to JSON support #59

Open
1 of 4 tasks
jeromesimeon opened this issue Aug 22, 2017 · 1 comment
Open
1 of 4 tasks

Improvements to JSON support #59

jeromesimeon opened this issue Aug 22, 2017 · 1 comment

Comments

@jeromesimeon
Copy link
Member

jeromesimeon commented Aug 22, 2017

JSON is used both at run time (to parse input data and produce outputs), and at compile time (notably generation of Cloudant Map/Reduce views).

The JSON support is split in two parts, with OCaml used for parsing/serialization, and Coq used for conversion operations between internal data structures (e.g., data/rtype) and JSON.

Work items include:

  • On the OCaml side, remove ad-hoc parsers/serializer and rely instead on a well supported OCaml library such as yojson
  • On the Coq side, show round-tripping properties for the conversions between JSON and the data model (data)
  • There is only a way to import RTypes from JSON, not the other way around. Generally speaking this part of the code might be worth reviewing/extending.
  • The JSON ast in Coq has a special 'jforeign' node that is used to represent foreign data. It is unclear if it is the right approach, and it might be better to handle the serialization from foreign data to JSON in a way that the AST is pure JSON, but an attempt to do that showed it would require further refactoring which may or may not be useful.
@jeromesimeon
Copy link
Member Author

And example of problem with JSON support can be found in Issue #51 and Issue #13.

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