{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "schema for a inverse functional identifier of a statement in the xAPI, version 1.0.*",
    "oneOf": [
        {
            "type": "object",
            "properties": {
                "mbox": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^mailto:"
                }
            },
            "patternProperties": {
                "^(mbox_sha1sum|account|openid)$": {
                    "type": "null"
                }
            },
            "required": [
                "mbox"
            ]
        },
        {
            "type": "object",
            "properties": {
                "mbox_sha1sum": {
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9]{20,}$"
                }
            },
            "patternProperties": {
                "^(mbox|account|openid)$": {
                    "type": "null"
                }
            },
            "required": [
                "mbox_sha1sum"
            ]
        },
        {
            "type": "object",
            "properties": {
                "openid": {
                    "type": "string",
                    "format": "uri",
                    "minLength": 1
                }
            },
            "patternProperties": {
                "^(mbox|account|mbox_sha1sum)$": {
                    "type": "null"
                }
            },
            "required": [
                "openid"
            ]
        },
        {
            "type": "object",
            "properties": {
                "account": {
                    "type": "object",
                    "properties": {
                        "homePage": {
                            "type": "string",
                            "format": "uri"
                        },
                        "name": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "homePage",
                        "name"
                    ],
                    "additionalProperties": false
                }
            },
            "patternProperties": {
                "^(mbox|mbox_sha1sum|openid)$": {
                    "type": "null"
                }
            },
            "required": [
                "account"
            ]
        }
    ]
}