{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Ballot",
    "description": "ClearElection Ballot definition, v0.0",
    "type": "object",
    "properties": {
        "clearelection-ballot": {
            "enum": [
                "v0.0"
            ]
        },
        "ballotId": {
            "type": "string"
        },
        "uniquifier": {
            "type": "string"
        },
        "contests": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "contestId": {
                        "type": "string"
                    },
                    "choices": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "candidateId": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "candidateId"
                            ]
                        }
                    }
                },
                "required": [
                    "contestId",
                    "choices"
                ]
            }
        },
        "demographic": {
            "type": "object"
        }
    },
    "required": [
        "clearelection-ballot",
        "ballotId",
        "uniquifier",
        "contests"
    ]
}