{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "oneOf": [
        {
            "type": [
                "string",
                "null"
            ],
            "minLength": 2
        },
        {
            "name": "Permission",
            "description": "A permission issued by a government or regulatory body to an entity to do something. This may be fine grained,e.g. to sell liquor, to accept customer deposits, or broader, e.g to operate as a bank, a restaurant. It may also be permission to do something physical, such as explore for oil in a given area, or mine for iron ore",
            "type": "object",
            "properties": {
                "activity_name": {
                    "type": "string"
                },
                "activity_id": {
                    "type": "string"
                },
                "permission_type": {
                    "enum": [
                        "operating",
                        "exploration",
                        "exploitation"
                    ],
                    "description": "types of permission, such as 'operating', 'exploration', 'exploitation'"
                },
                "restrictions": {
                    "type": "array",
                    "description": "conditions or restrictions on the permissions",
                    "items": {
                        "type": "string"
                    }
                },
                "other_attributes": {
                    "type": "object"
                }
            },
            "required": [
                "activity_name"
            ]
        }
    ]
}