matthiaskoenig / pkdb

Pharmacokinetics database
https://alpha.pk-db.com
32 stars 7 forks source link

JSON schema for study information (validation of JSON) #8

Closed matthiaskoenig closed 5 years ago

matthiaskoenig commented 6 years ago

Look into JSON schema for the final study schema. https://www.tutorialspoint.com/json/json_schema.htm This would allow some simple basic validation against the corresponding schema: https://pypi.org/project/jsonschema/ Also the schema would function as documentation for the allowed JSON and meaning.

matthiaskoenig commented 6 years ago

There are even some initiatives on the way to directly include ontology validation within the schema See https://github.com/elixir-europe/BioHackathon/tree/master/interoperability/JSON%20schema%20validation%20with%20ontologies and resources within.

matthiaskoenig commented 6 years ago

A library, which transforms a json schema into a html form. Might be good for us. https://json-editor.github.io/json-editor/

matthiaskoenig commented 6 years ago

If doing valididation precompile the schema, see https://www.peterbe.com/plog/jsonschema-validate-10x-faster-in-python