Hierarchy Items
Records have parents and children. Organizations own subsidiaries, ISO committees spawn subcommittees, control catalogs nest controls inside families. JSON-LD gives you no native way to say any of that, because JSON-LD arrays are unordered (see arrays in the style guide): there's no built-in notion of sort order, lineage, or which parent a child belongs to.
hierarchyItems is the answer. It's a top-level Array property on a Thing, registered in the Shared vocabulary as the HierarchyItem Thing, and that registry entry is the authoritative definition. It sits at the top level deliberately: hierarchy is content relationship data, and coreMetaData stays pure provenance bookkeeping. A record can belong to multiple hierarchies, so the property is an array.
Structure
Each HierarchyItem carries:
- @id: URL. The full unique link to the hierarchy item record.
- elementId: String. A unique and persistent identifier for the hierarchy item record.
- parents: Array of parent references (
@id,elementId). Empty for a top-level record. Plural because real hierarchies have records with multiple parents. - children: Array of child references (
@id,elementId). Empty for a record without children. The children listed belong to this item's parental genealogy, just like in real life. - sortValue: Integer. Sorts the record relative to its siblings. Null when order doesn't matter.
- genealogy: An ordered array of
elementIds giving the record's lineage, root first. The trail you follow to trace where a record came from.
Example
{
"@context": "https://grcschema.org",
"@type": "Person",
"@id": "https://grcschema.org/person/87",
"elementId": 87,
"name": "Jane Doe",
"hierarchyItems": [
{
"@type": "HierarchyItem",
"@id": "https://grcschema.org/hierarchy/5/item/123",
"elementId": 123,
"parents": [
{
"parent": {
"@id": "https://grcschema.org/person/45",
"elementId": 45
}
}
],
"children": [
{
"child": {
"@id": "https://grcschema.org/person/124",
"elementId": 124
}
},
{
"child": {
"@id": "https://grcschema.org/person/125",
"elementId": 125
}
}
],
"sortValue": 1,
"genealogy": [12, 45, 123]
}
]
}
One record, one hierarchy membership: Jane sits under record 45, above records 124 and 125, first among her siblings, with a lineage that runs 12 → 45 → 123.