I've dataset pulled from a linked data platform. The dataset looks like this:
label | relationClass |
---|---|
Organization | Department |
Department | Employee |
I want to create a JSON Schema based on this data where the hierarchy between objects is nested.
The decomposition of the hierarchy look something like this:
Organization
- Department
- Employee
Eventually the parsing should result in a JSON Schema looking like this:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"organization": {
"type": "object",
"properties": {
"department": {
"type": "object",
"properties": {
"employee": {
"type": "object"
}
}
}
}
}
}
}
Can someone help out with the most efficient way to achieve this?