Парсим, например, такой JSON
Код: Выделить всё
{
"RecipientReceiptMetadata": {
"ReceiptStatus": "000",
"ConfirmationMetadata": {
"ReceiptStatus": "111",
"DateTimeTicks": 637852826568038296
}
},
"ConfirmationMetadata": {
"ReceiptStatus": "222",
"DateTimeTicks": 637852826113117146
},
"AmendmentRequestMetadata": {
"AmendmentFlags": 3,
"ReceiptStatus": "333"
}
}
Код: Выделить всё
_DD_ReceiptStatus Group,Type
ReceiptStatus string(40)
end
_DD_ConfirmationMetadata Group(_DD_ReceiptStatus),Type
DateTimeTicks string(40)
end
_DD_RecipientReceiptMetadata Group(_DD_ReceiptStatus),Type
ConfirmationMetadata Group(_DD_ConfirmationMetadata)
end
_DD_AmendmentRequestMetadata Group(_DD_ReceiptStatus),Type
AmendmentFlags string(10)
end
Document Group
RecipientReceiptMetadata Group(_DD_RecipientReceiptMetadata).
ConfirmationMetadata Group(_DD_ConfirmationMetadata).
AmendmentRequestMetadata Group(_DD_AmendmentRequestMetadata).
end
Code
ret# = parser.ToGroup(Document)
Код: Выделить всё
Document.RecipientReceiptMetadata.ReceiptStatus = '000' !верно
Document.RecipientReceiptMetadata.ConfirmationMetadata.ReceiptStatus = '222' !должно быть '111'
ConfirmationMetadata.ReceiptStatus = '' !должно быть '222'
AmendmentRequestMetadata.ReceiptStatus = '333' !верно