Answer the question
In order to leave comments, you need to log in
[C# + NetownSoft.Json] How to parse a file?
Good afternoon.
There is a test.json file with the following content:
[
{
"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": ""
}
]
Cannot deserialize the current JSON array (eg [1,2,3]) into type
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question