{
  "ballotBoxId": "6af19d867c7a43e8b62e3bc4814183df",
  "tenantId": "100",
  "ballot": {
    "id": "12e6f4ade9c14a3fa4d8de2ac14d47a3",
    "defaultTitle": "ballot_KantonalVariant",
    "defaultDescription": "ballot_KantonalVariant",
    "alias": "ballot_1",
    "electionEvent": {
      "id": "51683a22a7c849679b787342c691d7ab"
    },
    "contests": [
      {
        "id": "444057d15a83448291c793243f54f35b",
        "defaultTitle": "Cantonal votation contest fr",
        "alias": "KantonalVariant",
        "defaultDescription": "Cantonal votation contest fr",
        "electionEvent": {
          "id": "51683a22a7c849679b787342c691d7ab"
        },
        "template": "options",
        "fullBlank": "false",
        "options": [
          {
            "id": "b5a6a58404d341dfb58c43d0e76b5da4",
            "representation": "14303",
            "attribute": "85d273a92bf548a287a92479b8580331"
          },
          {
            "id": "33e4aa3332444666aabeb62547e3b0c6",
            "representation": "143063",
            "attribute": "af8fabe7a34a4e26bcc36367cc45fcd9"
          },
          {
            "id": "b2e4feb8904b489d8da86e8179558738",
            "representation": "143137",
            "attribute": "5c187780813f4a27a061de88aa6489ef"
          },
          {
            "id": "76e71f9bc2924100aab148cd56c21825",
            "representation": "143141",
            "attribute": "154a7103e9284d93b97eb4345a9572ce"
          },
          {
            "id": "2f751c2156a743e4874aa0e0dcdf19a2",
            "representation": "143093",
            "attribute": "3c4fb0c417c14ce9abd0dd69cd4122e0"
          },
          {
            "id": "f655d3d437564cd4a2f47ca420aacd4f",
            "representation": "143159",
            "attribute": "99910f375e6f444fbd243214da3e171f"
          }
        ],
        "attributes": [
          {
            "id": "dae56d6b1f524a9fa789cde2e150052c",
            "alias": "WRITE_IN_ea5bb4e7f841489f860416599dca6a8e",
            "correctness": "false",
            "related": [
              "48d3ce6ab91841069e94ead99c065b6f"
            ]
          },
          {
            "id": "9d7555d4d4c841a1b028306a6868f11a",
            "alias": "BLANK_5a4c6473acf84dea8a1418a46f1ce502",
            "correctness": "false",
            "related": [
              "9b5e3eec18a44cd5bcf3e52b2423a16b"
            ]
          },
          {
            "id": "717cf2706d374a22995aeafdf3e1c506",
            "alias": "WRITE_IN_32736bcfe7d44b57a16ad334b494c3a7",
            "correctness": "false",
            "related": [
              "cb99cdc2123a4d02b07fa9fa7cf3cde1"
            ]
          },
          {
            "id": "87f1020287324bf1a735ac2e54bd07d9",
            "alias": "BLANK_32736bcfe7d44b57a16ad334b494c3a7",
            "correctness": "false",
            "related": [
              "cb99cdc2123a4d02b07fa9fa7cf3cde1"
            ]
          },
          {
            "id": "956bba77265d4f61a1fddf1589456847",
            "alias": "WRITE_IN_5a4c6473acf84dea8a1418a46f1ce502",
            "correctness": "false",
            "related": [
              "9b5e3eec18a44cd5bcf3e52b2423a16b"
            ]
          },
          {
            "id": "dfa0ef5ff3b247649ff984e8ca646cc6",
            "alias": "BLANK_ea5bb4e7f841489f860416599dca6a8e",
            "correctness": "false",
            "related": [
              "48d3ce6ab91841069e94ead99c065b6f"
            ]
          },
          {
            "id": "9b5e3eec18a44cd5bcf3e52b2423a16b",
            "alias": "referendum_question1",
            "correctness": "true",
            "related": []
          },
          {
            "id": "cb99cdc2123a4d02b07fa9fa7cf3cde1",
            "alias": "referendum_question2",
            "correctness": "true",
            "related": []
          },
          {
            "id": "48d3ce6ab91841069e94ead99c065b6f",
            "alias": "referendum_tiebreak",
            "correctness": "true",
            "related": []
          },
          {
            "id": "af8fabe7a34a4e26bcc36367cc45fcd9",
            "alias": "0e67582b-e447-3de6-9b7d-9eeca223fc9b",
            "correctness": "false",
            "related": [
              "9b5e3eec18a44cd5bcf3e52b2423a16b"
            ]
          },
          {
            "id": "85d273a92bf548a287a92479b8580331",
            "alias": "851bb9e6-2b20-3249-a08a-7f52471e570f",
            "correctness": "false",
            "related": [
              "9b5e3eec18a44cd5bcf3e52b2423a16b"
            ]
          },
          {
            "id": "3c4fb0c417c14ce9abd0dd69cd4122e0",
            "alias": "843366f4-6ef3-3ff2-8e72-2aa7756b95cf",
            "correctness": "false",
            "related": [
              "cb99cdc2123a4d02b07fa9fa7cf3cde1"
            ]
          },
          {
            "id": "99910f375e6f444fbd243214da3e171f",
            "alias": "ffa75b5e-23cd-30bd-ae1a-c13570d812ac",
            "correctness": "false",
            "related": [
              "cb99cdc2123a4d02b07fa9fa7cf3cde1"
            ]
          },
          {
            "id": "5c187780813f4a27a061de88aa6489ef",
            "alias": "abe3e5e6-1b1b-33d2-a54f-4436ca6c6b4e",
            "correctness": "false",
            "related": [
              "48d3ce6ab91841069e94ead99c065b6f"
            ]
          },
          {
            "id": "154a7103e9284d93b97eb4345a9572ce",
            "alias": "881955b4-d33e-37eb-a80a-176b13614189",
            "correctness": "false",
            "related": [
              "48d3ce6ab91841069e94ead99c065b6f"
            ]
          }
        ],
        "questions": [
          {
            "id": "5a4c6473acf84dea8a1418a46f1ce502",
            "max": "1",
            "min": "1",
            "accumulation": "1",
            "writeIn": "false",
            "blankAttribute": "9d7555d4d4c841a1b028306a6868f11a",
            "writeInAttribute": "956bba77265d4f61a1fddf1589456847",
            "attribute": "9b5e3eec18a44cd5bcf3e52b2423a16b",
            "fusions": []
          },
          {
            "id": "ea5bb4e7f841489f860416599dca6a8e",
            "max": "1",
            "min": "1",
            "accumulation": "1",
            "writeIn": "false",
            "blankAttribute": "dfa0ef5ff3b247649ff984e8ca646cc6",
            "writeInAttribute": "dae56d6b1f524a9fa789cde2e150052c",
            "attribute": "48d3ce6ab91841069e94ead99c065b6f",
            "fusions": []
          },
          {
            "id": "32736bcfe7d44b57a16ad334b494c3a7",
            "max": "1",
            "min": "1",
            "accumulation": "1",
            "writeIn": "false",
            "blankAttribute": "87f1020287324bf1a735ac2e54bd07d9",
            "writeInAttribute": "717cf2706d374a22995aeafdf3e1c506",
            "attribute": "cb99cdc2123a4d02b07fa9fa7cf3cde1",
            "fusions": []
          }
        ],
        "encryptedCorrectnessRule": "function evaluateCorrectness(selection, callbackFunction){if (typeof(callbackFunction)==='undefined') { callbackFunction = function (type, reference, extra) {};};var result = true;result = function (subSelection, callbackFunction) {var partialResult = true;var selectionName = '444057d15a83448291c793243f54f35b';var attributeName = '48d3ce6ab91841069e94ead99c065b6f';var max = 1;var count = 0;for (i = 0; i < subSelection.length; i++) {var submittedOption = subSelection[i];if (submittedOption.indexOf(attributeName) > -1) {count++;}}if (count < max) {callbackFunction('MIN_ERROR', selectionName);partialResult = false;}if (count > max) {callbackFunction('MAX_ERROR', selectionName);partialResult = false;}return partialResult;}(selection, callbackFunction) && result;result = function (subSelection, callbackFunction) {var partialResult = true;var selectionName = '444057d15a83448291c793243f54f35b';var attributeName = 'cb99cdc2123a4d02b07fa9fa7cf3cde1';var max = 1;var count = 0;for (i = 0; i < subSelection.length; i++) {var submittedOption = subSelection[i];if (submittedOption.indexOf(attributeName) > -1) {count++;}}if (count < max) {callbackFunction('MIN_ERROR', selectionName);partialResult = false;}if (count > max) {callbackFunction('MAX_ERROR', selectionName);partialResult = false;}return partialResult;}(selection, callbackFunction) && result;result = function (subSelection, callbackFunction) {var partialResult = true;var selectionName = '444057d15a83448291c793243f54f35b';var attributeName = '9b5e3eec18a44cd5bcf3e52b2423a16b';var max = 1;var count = 0;for (i = 0; i < subSelection.length; i++) {var submittedOption = subSelection[i];if (submittedOption.indexOf(attributeName) > -1) {count++;}}if (count < max) {callbackFunction('MIN_ERROR', selectionName);partialResult = false;}if (count > max) {callbackFunction('MAX_ERROR', selectionName);partialResult = false;}return partialResult;}(selection, callbackFunction) && result;return result;}",
        "decryptedCorrectnessRule": "function evaluateCorrectness(selection, callbackFunction){if (typeof(callbackFunction)==='undefined') { callbackFunction = function (type, reference, extra) {};};var B64 = {encode: function (r) {return r;},decode: function (r) {return r;}};var encodedSelection = [];for (i = 0; i < selection.length; i++) {encodedSelection.push(B64.encode(selection[i]));}var CorrectnessFunctions = {getRelevantVotingOptions : function (votingOptions, selection){var selectionRelevantVotingOptions = [];for (i = 0; i < selection.length; i++) {if (votingOptions.indexOf(selection[i]) > -1) {selectionRelevantVotingOptions.push(selection[i]);}}return selectionRelevantVotingOptions;},isFullBlank : function (selection, allBlanks){var encounteredBlanks = [];var encounteredInAll = true;for (i = 0; i < allBlanks.length; i++) {var encounteredInSelection = false;for (j = 0; j < allBlanks[i].length; j++) {if (selection.indexOf(allBlanks[i][j]) > -1) {encounteredBlanks.push(allBlanks[i][j]);encounteredInSelection = true;}}encounteredInAll = encounteredInAll && encounteredInSelection}return encounteredBlanks.length == selection.length && encounteredInAll;},isMaxMatch : function (selectionRelevantVotingOptions, maxReq, selectionName, callbackFunction){var maxMatch = maxReq >= selectionRelevantVotingOptions.length;if (!maxMatch) {callbackFunction('MAX_ERROR', B64.decode(selectionName));}return maxMatch;},isMinMatch : function (selectionRelevantVotingOptions, minReq, selectionName, callbackFunction){var minMatch = minReq <= selectionRelevantVotingOptions.length;if (!minMatch) {callbackFunction('MIN_ERROR', B64.decode(selectionName));}return minMatch;},isMinWithBlankMatch: function (selectionRelevantVotingOptions, minReq, allBlanksSelected, fullBlank, blanks, selectionName, callbackFunction) {var partialResult = true;var encounteredBlanks = [];var optionsWithoutBlanks = [];for (i = 0; i < selectionRelevantVotingOptions.length; i++) {if (blanks.indexOf(selectionRelevantVotingOptions[i]) > -1) {encounteredBlanks.push(selectionRelevantVotingOptions[i]);} else {optionsWithoutBlanks.push(selectionRelevantVotingOptions[i]);}}if ((allBlanksSelected && !fullBlank) || (minReq > optionsWithoutBlanks.length && !allBlanksSelected)) {callbackFunction('MIN_NON_BLANK_ERROR', B64.decode(selectionName));partialResult = false;}return partialResult;},areAllSelectionsUnique: function (encodedSelection, callbackFunction) {var partialResult = true;var duplicates = encodedSelection.reduce(function(acc, el, i, arr) {if (arr.indexOf(el) !== i && acc.indexOf(el) < 0) acc.push(el); return acc;}, []);if (duplicates.length != 0) {callbackFunction('MULTIPLE_SELECTION_ERROR', B64.decode(encodedSelection[duplicates[0]]));partialResult = false;}return partialResult;},checkFusion: function (fusionVotingOptions, cumulNumber, encodedSelection, callbackFunction) {var partialResult = true;for (i = 0; i < encodedSelection.length; i++) {for (j = 0; j < fusionVotingOptions.length; j++) {if (fusionVotingOptions[j].indexOf(encodedSelection[i]) > -1){var count = 0;for (k = 0; k < fusionVotingOptions[j].length; k++) {if (encodedSelection.indexOf(fusionVotingOptions[j][k]) > -1) {count++;}}if (count > cumulNumber){callbackFunction('ACCUMULATION_ERROR', B64.decode(encodedSelection[i]));partialResult = false;}}}}return partialResult;}};var allBlanks = [[], [], []];var allBlanksSelected = CorrectnessFunctions.isFullBlank(encodedSelection, allBlanks);var result = true;result = function (subSelection, allBlanksSelected, callbackFunction){var partialResult = true;var selectionName = '5a4c6473acf84dea8a1418a46f1ce502';var votingOptions = ['14303', '143063'];var selectionRelevantVotingOptions = CorrectnessFunctions.getRelevantVotingOptions(votingOptions, subSelection);partialResult = CorrectnessFunctions.isMinMatch(selectionRelevantVotingOptions, 1, selectionName, callbackFunction) && partialResult;partialResult = CorrectnessFunctions.isMaxMatch(selectionRelevantVotingOptions, 1, selectionName, callbackFunction) && partialResult;var fusionVotingOptions = [];partialResult = CorrectnessFunctions.checkFusion(fusionVotingOptions, 1, selectionRelevantVotingOptions, callbackFunction) && partialResult;return partialResult;}(encodedSelection, allBlanksSelected, callbackFunction) && result;result = function (subSelection, allBlanksSelected, callbackFunction){var partialResult = true;var selectionName = 'ea5bb4e7f841489f860416599dca6a8e';var votingOptions = ['143137', '143141'];var selectionRelevantVotingOptions = CorrectnessFunctions.getRelevantVotingOptions(votingOptions, subSelection);partialResult = CorrectnessFunctions.isMinMatch(selectionRelevantVotingOptions, 1, selectionName, callbackFunction) && partialResult;partialResult = CorrectnessFunctions.isMaxMatch(selectionRelevantVotingOptions, 1, selectionName, callbackFunction) && partialResult;var fusionVotingOptions = [];partialResult = CorrectnessFunctions.checkFusion(fusionVotingOptions, 1, selectionRelevantVotingOptions, callbackFunction) && partialResult;return partialResult;}(encodedSelection, allBlanksSelected, callbackFunction) && result;result = function (subSelection, allBlanksSelected, callbackFunction){var partialResult = true;var selectionName = '32736bcfe7d44b57a16ad334b494c3a7';var votingOptions = ['143093', '143159'];var selectionRelevantVotingOptions = CorrectnessFunctions.getRelevantVotingOptions(votingOptions, subSelection);partialResult = CorrectnessFunctions.isMinMatch(selectionRelevantVotingOptions, 1, selectionName, callbackFunction) && partialResult;partialResult = CorrectnessFunctions.isMaxMatch(selectionRelevantVotingOptions, 1, selectionName, callbackFunction) && partialResult;var fusionVotingOptions = [];partialResult = CorrectnessFunctions.checkFusion(fusionVotingOptions, 1, selectionRelevantVotingOptions, callbackFunction) && partialResult;return partialResult;}(encodedSelection, allBlanksSelected, callbackFunction) && result;;var globalVotingOptions = ['14303', '143063', '143137', '143141', '143093', '143159'];result = CorrectnessFunctions.areAllSelectionsUnique(encodedSelection, callbackFunction) && result;return result;}"
      }
    ],
    "status": "SIGNED",
    "details": "Synchronized",
    "synchronized": "true",
    "ballotBoxes": "FR-CT-1|FR-MU-9999",
    "signedObject": "eyJhbGciOiJQUzI1NiJ9.[encoded data, 17223 characters].RB-FblZzQpmQdgQ0PKd8_eLtRrqu2dSDYdPgZEQ8KKiZeq0PA91lKgXko3zn77L5aHseXZyCNiO_EfW9CI4LNn4sI9nTDto_s-crA6KYRckK8zpCPYd5PEQNpjGBBV2NjPiWyFjvo3m1L0bADTmHpQRGmbOFie5IQVyoTd_k4cAJq6jfvXq1A4fluWq1ECVU-V2DCvsBD23yi3mc5hwt7uG_-pLNkK6Jqpz1_JrlM2SNzNQltL8Fct7roNcRkOmrsLdxqXVE7-Xk6AZsTbZd8hT6j8bAiAM6eouUzmfCbbN0iuzkuFYkIjVQ_STZVbF3GVLAXdV0_OFueigONcmgQA"
  },
  "elGamalEncryptionParametersP": "16370518994319586760319791526293535327576438646782139419846004180837103527129035954742043590609421369665944746587885814920851694546456891767644945459124422553763416586515339978014154452159687109161090635367600349264934924141746082060353483306855352192358732451955232000593777554431798981574529854314651092086488426390776811367125009551346089319315111509277347117467107914073639456805159094562593954195960531136052208019343392906816001017488051366518122404819967204601427304267380238263913892658950281593755894747339126531018026798982785331079065126375455293409065540731646939808640273393855256230820509217411510058759",
  "signingKey": "-----BEGIN RSA PRIVATE KEY-----\nMIICHgIBAAKCAQEAoqDOoSEylvyFMqpATm298HyqN18aEQhtjRwjigChlg3bsDC2\nsFfJiq/bDR6vv6g0Ya9Bf9YVmWn5xMESA8u5uqyQdiv5X3dbGEbMqkaTBTDeCONN\n3FkL7GD3P5HlINFb5scGlD9/NYutIc5/1APE5RixJcroHsn4vkh97XpyTRjvPHe4\nf0j+nm8Uhh2zjNMhibWKVzdL5Qcl3S5E52zYgpOJna6J2WDNfgthYozOSdobREB+\n6+bG29qLJIjRg4G06UF1MIogv5dDYROm4G8DgOz0SefBCOLfhAOQxQeLEGXHn6SJ\n9aOWVCZ8/8s1pX3r2+WZ5ptFtSdekugE9Wj7CQIBAAKCAQB3R4LGY9b7LxNy6bRo\n0czySj1+h15TB99yFCVs3rGloVx0igY0qO7Frd34bX1yESj6TNS5sof9EeGEEifo\naNA8vrzmL7Kj9qL111fdvA2xTPpNgoplB1rbcPNnyNZJj8TcKzYEHd5ro5rEpPTU\nyD7t2YJ0ubIuguzSg9D5EUosiOWnrgLIBOi/cspNr13gUfDkjaG+DJx8yHKKI+0S\ndwtBQoBbvaMq1yxnvKFu/JZqetcXbJgYQrJKoH+Y6PWFrl/5EYHtW0/+v4CRLbSt\njVX2nWNxxkBIKpbp6ZDwPdcSzpyr9ogwVjmFNKu6ogZ85vi5sqOsy3mg2RJiHEbY\n0zlRAgEAAgEAAgEAAgEAAgEA\n-----END RSA PRIVATE KEY-----\n",
  "writeInAlphabet": "IyAnKCksLS4vMDEyMzQ1Njc4OUFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXrCoMKixaDFocW9xb7FksWTxbjDgMOBw4LDg8OEw4XDhsOHw4jDicOKw4vDjMONw47Dj8OQw5HDksOTw5TDlcOWw5jDmcOaw5vDnMOdw57Dn8Ogw6HDosOjw6TDpcOmw6fDqMOpw6rDq8Osw63DrsOvw7DDscOyw7PDtMO1w7bDuMO5w7rDu8O8w73DvsO/",
  "outputPath":"/tmp"
}
