cityjson / specs

Specifications for CityJSON, a JSON-based encoding for 3D city models
https://cityjson.org
Creative Commons Zero v1.0 Universal
107 stars 25 forks source link

Allow null for "children_roles" #109

Closed clausnagel closed 2 years ago

clausnagel commented 2 years ago

The property "children_roles" of "CityObjectGroup" is currently defined as array of strings. Not all members of a group must necessarily have a role. However, the way "children_roles" is defined in the schema, null is not allowed as value in this array. You can only put an empty string "" in case a role is not defined. Woud be nice to be able to use null in such cases.

So, I suggest changing this

  "children_roles": {
    "type": "array",
    "description": "the role of each of the CityObjects members of that group",
    "items": {
      "type": "string"
    }
  }

into this

  "children_roles": {
    "type": "array",
    "description": "the role of each of the CityObjects members of that group",
    "items": {
      "type": ["string", "null"]
    }
  }