Добрый день.
Есть файл test.json следующего содержания:
[
{
"RecType": "Fact",
"LMSZID": "4a382da4-6075-4500-8671-fc327c640275",
"categoryID": "efd64fa2-cda9-45a7-90a1-bcfd600a03ff",
"ONMSZCode": 2472.000001,
"SNILS_recip": 11111111111,
"FamilyName_recip": "Григорьева1",
"Name_recip": "Нина",
"Patronymic_recip": "Степановна",
"Gender_recip": "Ж",
"BirthDate_recip": "01.01.1935",
"doctype_recip": 7,
"doc_Series_recip": "Q-0.А",
"doc_Number_recip": 0,
"doc_IssueDate_recip": "06.08.2003",
"doc_Issuer_recip": "Котельниковским о-м Люберецкого УВД МО",
"SNILS_reason": "",
"FamilyName_reason": "",
"Name_reason": "",
"Patronymic_reason": "",
"Gender_reason": "",
"BirthDate_reason": "",
"doctype_reason": "",
"doc_Series_reason": "",
"doc_Number_reason": "",
"doc_IssueDate_reason": "",
"doc_Issuer_reason": "",
"decision_date": "01.01.2018",
"dateStart": "01.01.2018",
"dateFinish": "01.06.2018",
"usingSign": "Нет",
"criteria": "",
"FormCode": 1,
"amount": "81,14",
"measuryCode": 1,
"monetization": "Нет",
"content": "",
"comment": "",
"equivalentAmount": ""
},
{
"RecType": "Fact",
"LMSZID": "4a382da4-6075-4500-8671-fc327c640275",
"categoryID": "efd64fa2-cda9-45a7-90a1-bcfd600a03ff",
"ONMSZCode": 2472.000001,
"SNILS_recip": 11111111111,
"FamilyName_recip": "Григорьева2",
"Name_recip": "Нина",
"Patronymic_recip": "Степановна",
"Gender_recip": "Ж",
"BirthDate_recip": "01.01.1935",
"doctype_recip": 7,
"doc_Series_recip": "Q-0.А",
"doc_Number_recip": 0,
"doc_IssueDate_recip": "06.08.2003",
"doc_Issuer_recip": "Котельниковским о-м Люберецкого УВД МО",
"SNILS_reason": "",
"FamilyName_reason": "",
"Name_reason": "",
"Patronymic_reason": "",
"Gender_reason": "",
"BirthDate_reason": "",
"doctype_reason": "",
"doc_Series_reason": "",
"doc_Number_reason": "",
"doc_IssueDate_reason": "",
"doc_Issuer_reason": "",
"decision_date": "01.01.2018",
"dateStart": "01.01.2018",
"dateFinish": "01.06.2018",
"usingSign": "Нет",
"criteria": "",
"FormCode": 1,
"amount": "81,14",
"measuryCode": 1,
"monetization": "Нет",
"content": "",
"comment": "",
"equivalentAmount": ""
},
{
"RecType": "Fact",
"LMSZID": "4a382da4-6075-4500-8671-fc327c640275",
"categoryID": "efd64fa2-cda9-45a7-90a1-bcfd600a03ff",
"ONMSZCode": 2472.000001,
"SNILS_recip": 11111111111,
"FamilyName_recip": "Григорьева3",
"Name_recip": "Нина",
"Patronymic_recip": "Степановна",
"Gender_recip": "Ж",
"BirthDate_recip": "01.01.1935",
"doctype_recip": 7,
"doc_Series_recip": "Q-0.А",
"doc_Number_recip": 0,
"doc_IssueDate_recip": "06.08.2003",
"doc_Issuer_recip": "Котельниковским о-м Люберецкого УВД МО",
"SNILS_reason": "",
"FamilyName_reason": "",
"Name_reason": "",
"Patronymic_reason": "",
"Gender_reason": "",
"BirthDate_reason": "",
"doctype_reason": "",
"doc_Series_reason": "",
"doc_Number_reason": "",
"doc_IssueDate_reason": "",
"doc_Issuer_reason": "",
"decision_date": "01.01.2018",
"dateStart": "01.01.2018",
"dateFinish": "01.06.2018",
"usingSign": "Нет",
"criteria": "",
"FormCode": 1,
"amount": "81,14",
"measuryCode": 1,
"monetization": "Нет",
"content": "",
"comment": "",
"equivalentAmount": ""
},
{
"RecType": "Fact",
"LMSZID": "4a382da4-6075-4500-8671-fc327c640275",
"categoryID": "efd64fa2-cda9-45a7-90a1-bcfd600a03ff",
"ONMSZCode": 2472.000001,
"SNILS_recip": 11111111111,
"FamilyName_recip": "Григорьева4",
"Name_recip": "Нина",
"Patronymic_recip": "Степановна",
"Gender_recip": "Ж",
"BirthDate_recip": "01.01.1935",
"doctype_recip": 7,
"doc_Series_recip": "Q-0.А",
"doc_Number_recip": 0,
"doc_IssueDate_recip": "06.08.2003",
"doc_Issuer_recip": "Котельниковским о-м Люберецкого УВД МО",
"SNILS_reason": "",
"FamilyName_reason": "",
"Name_reason": "",
"Patronymic_reason": "",
"Gender_reason": "",
"BirthDate_reason": "",
"doctype_reason": "",
"doc_Series_reason": "",
"doc_Number_reason": "",
"doc_IssueDate_reason": "",
"doc_Issuer_reason": "",
"decision_date": "01.01.2018",
"dateStart": "01.01.2018",
"dateFinish": "01.06.2018",
"usingSign": "Нет",
"criteria": "",
"FormCode": 1,
"amount": "81,14",
"measuryCode": 1,
"monetization": "Нет",
"content": "",
"comment": "",
"equivalentAmount": ""
}
]
На текущий момент нужно получить данные "ONMSZCode" и "FamilyName_recip". Для парсинга использовал
инструкцию Oxoron
Несмотря на это, получаю ошибку
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type
Буду рад любой помощи.
UPD: Решение как распарсить данные есть. Но это решение не связано с той инструкцией, которая была указана
Oxoron По его инструкции всё равно падает ошибка, что данные распарсить нельзя.
Буду очень признателен, если кто-то сможет поправить именно тот пример. Я хоть пойму, чего не понимаю.