Recebi a seguinte mensagem de erro durante a implantação. A linha onde ocorre o Erro, nunca foi alterada durante a edição.
System.JSONException: Caractere inesperado ('"' (código 34)): esperava vírgula para separar as entradas OBJECT em [linha:213, coluna:14] Rastreamento de pilha: (Código do sistema) Class.OCRResponseWrapper.parse: linha 96, coluna 1 Class.OCRServiceHandlerTest.testProcessOCRTickets: linha 598, coluna 1
Esta é uma versão abreviada
String response = '{\n' +
' "api_request": {\n' +
' "error": {},\n' +
' "resources": [\n' +
' "document"\n' +
' ],\n' +
' "status": "success",\n' +
' "status_code": 201,\n' +
' "url": "link_to_api"\n' +
' },\n' +
' "document": {\n' +
' "annotations": {\n' +
' "labels": []\n' +
' },\n' +
' "id": "2664779a-3a9f-46f2-a464-5c7ecdfef886",\n' +
' "inference": {\n' +
' "extras": {},\n' +
' "finished_at": "2022-05-31T08:24:17+00:00",\n' +
' "pages": [\n' +
' {\n' +
' "extras": {},\n' +
' "id": 0,\n' +
' "prediction": {\n' +
' "authority": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.6223,\n' +
' 0.9623\n' +
' ],\n' +
' [\n' +
' 0.9431,\n' +
' 0.2612\n' +
' ],\n' +
' [\n' +
' 0.08,\n' +
' 0.6763\n' +
' ],\n' +
' [\n' +
' 0.12,\n' +
' 0.1751\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "fine_category": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "ANONYMVERFUGUNG",\n' +
' "polygon": [\n' +
' [\n' +
' 0.8061,\n' +
' 0.3567\n' +
' ],\n' +
' [\n' +
' 0.4201,\n' +
' 0.9075\n' +
' ],\n' +
' [\n' +
' 0.7176,\n' +
' 0.3005\n' +
' ],\n' +
' [\n' +
' 0.2901,\n' +
' 0.9953\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "fine_date_time": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.7343,\n' +
' 0.4254\n' +
' ],\n' +
' [\n' +
' 0.2391,\n' +
' 0.6612\n' +
' ],\n' +
' [\n' +
' 0.5813,\n' +
' 0.4651\n' +
' ],\n' +
' [\n' +
' 0.6642,\n' +
' 0.0535\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "fine_type": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.2811,\n' +
' 0.503\n' +
' ],\n' +
' [\n' +
' 0.5495,\n' +
' 0.0628\n' +
' ],\n' +
' [\n' +
' 0.6965,\n' +
' 0.011\n' +
' ],\n' +
' [\n' +
' 0.3931,\n' +
' 0.8666\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "license_plate": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.8085,\n' +
' 0.1184\n' +
' ],\n' +
' [\n' +
' 0.5322,\n' +
' 0.7751\n' +
' ],\n' +
' [\n' +
' 0.5778,\n' +
' 0.3133\n' +
' ],\n' +
' [\n' +
' 0.9082,\n' +
' 0.7193\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "link_for_driver_identification": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.381,\n' +
' 0.9487\n' +
' ],\n' +
' [\n' +
' 0.8849,\n' +
' 0.6386\n' +
' ],\n' +
' [\n' +
' 0.8069,\n' +
' 0.3403\n' +
' ],\n' +
' [\n' +
' 0.0637,\n' +
' 0.569\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "location": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.2361,\n' +
' 0.5289\n' +
' ],\n' +
' [\n' +
' 0.4005,\n' +
' 0.9247\n' +
' ],\n' +
' [\n' +
' 0.4554,\n' +
' 0.3263\n' +
' ],\n' +
' [\n' +
' 0.5909,\n' +
' 0.7414\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' }\n' +
' "authority_email": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.594,\n' +
' 0.23\n' +
' ],\n' +
' [\n' +
' 0.782,\n' +
' 0.232\n' +
' ],\n' +
' [\n' +
' 0.782,\n' +
' 0.24\n' +
' ],\n' +
' [\n' +
' 0.594,\n' +
' 0.238\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' }\n' +
' "authority_reference": {\n' +
' "confidence": 0.99,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.174,\n' +
' 0.113\n' +
' ],\n' +
' [\n' +
' 0.212,\n' +
' 0.113\n' +
' ],\n' +
' [\n' +
' 0.212,\n' +
' 0.122\n' +
' ],\n' +
' [\n' +
' 0.174,\n' +
' 0.122\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' }\n' +
' }\n' +
' }\n' +
' ],\n' +
' "prediction": {\n' +
' "authority": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.9915,\n' +
' 0.6867\n' +
' ],\n' +
' [\n' +
' 0.3138,\n' +
' 0.556\n' +
' ],\n' +
' [\n' +
' 0.4087,\n' +
' 0.9454\n' +
' ],\n' +
' [\n' +
' 0.065,\n' +
' 0.1378\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "fine_category": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "ANONYMVERFUGUNG",\n' +
' "polygon": [\n' +
' [\n' +
' 0.936,\n' +
' 0.4821\n' +
' ],\n' +
' [\n' +
' 0.3597,\n' +
' 0.0843\n' +
' ],\n' +
' [\n' +
' 0.6884,\n' +
' 0.8568\n' +
' ],\n' +
' [\n' +
' 0.3417,\n' +
' 0.1877\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "fine_date_time": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.1522,\n' +
' 0.6463\n' +
' ],\n' +
' [\n' +
' 0.5195,\n' +
' 0.5938\n' +
' ],\n' +
' [\n' +
' 0.0634,\n' +
' 0.7891\n' +
' ],\n' +
' [\n' +
' 0.7832,\n' +
' 0.4485\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "fine_type": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.5954,\n' +
' 0.1722\n' +
' ],\n' +
' [\n' +
' 0.8358,\n' +
' 0.6238\n' +
' ],\n' +
' [\n' +
' 0.833,\n' +
' 0.4692\n' +
' ],\n' +
' [\n' +
' 0.3512,\n' +
' 0.0749\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "license_plate": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.2866,\n' +
' 0.112\n' +
' ],\n' +
' [\n' +
' 0.0644,\n' +
' 0.6146\n' +
' ],\n' +
' [\n' +
' 0.0885,\n' +
' 0.4038\n' +
' ],\n' +
' [\n' +
' 0.7936,\n' +
' 0.87\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "link_for_driver_identification": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.6128,\n' +
' 0.5198\n' +
' ],\n' +
' [\n' +
' 0.1134,\n' +
' 0.3069\n' +
' ],\n' +
' [\n' +
' 0.5099,\n' +
' 0.5496\n' +
' ],\n' +
' [\n' +
' 0.1741,\n' +
' 0.9287\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' },\n' +
' "location": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.8304,\n' +
' 0.1977\n' +
' ],\n' +
' [\n' +
' 0.8948,\n' +
' 0.1731\n' +
' ],\n' +
' [\n' +
' 0.1162,\n' +
' 0.7091\n' +
' ],\n' +
' [\n' +
' 0.0559,\n' +
' 0.965\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' }\n' +
' "authority_email": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.594,\n' +
' 0.23\n' +
' ],\n' +
' [\n' +
' 0.782,\n' +
' 0.232\n' +
' ],\n' +
' [\n' +
' 0.782,\n' +
' 0.24\n' +
' ],\n' +
' [\n' +
' 0.594,\n' +
' 0.238\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' }\n' +
' "authority_reference": {\n' +
' "confidence": 0.99,\n' +
' "page_id": 0,\n' +
' "values": [\n' +
' {\n' +
' "confidence": 0.99,\n' +
' "content": "string",\n' +
' "polygon": [\n' +
' [\n' +
' 0.174,\n' +
' 0.113\n' +
' ],\n' +
' [\n' +
' 0.212,\n' +
' 0.113\n' +
' ],\n' +
' [\n' +
' 0.212,\n' +
' 0.122\n' +
' ],\n' +
' [\n' +
' 0.174,\n' +
' 0.122\n' +
' ]\n' +
' ]\n' +
' }\n' +
' ]\n' +
' }\n' +
' },\n' +
' "processing_time": 1.919,\n' +
' "product": {\n' +
' "features": [\n' +
' "license_plate",\n' +
' "fine_date_time",\n' +
' "fine_type",\n' +
' "authority",\n' +
' "location",\n' +
' "link_for_driver_identification",\n' +
' "fine_category",\n' +
' "authority_email",\n' +
' "authority_reference"\n' +
' ],\n' +
' "name": "api_name",\n' +
' "version": "1.4"\n' +
' },\n' +
' "started_at": "datetime"\n' +
' },\n' +
' "n_pages": 1,\n' +
' "name": "myfile.jpg",\n' +
' "ocr": {}\n' +
' }\n' +
'}';
Acabei de adicionar Authority_email e Authority_reference