-4
Guys I’m not getting to realize this object,
public class itensjsonPai
{
public string resource { get; set; }
public List<transaction> transaction { get; set; }
}
public class itensjsonfilho
{
public string id { get; set; }
public string datetime_operacao { get; set; }
public string logico_terminal { get; set; }
public string ref_EC { get; set; }
public decimal valor_operado { get; set; }
public string parcelas { get; set; }
public string tipo_operacao { get; set; }
public string parsed_type { get; set; }
public string parsed_status { get; set; }
public string card_holder_name { get; set; }
public string cardmask { get; set; }
public string bandeira { get; set; }
public string antecipacao_auto { get; set; }
public string nsu { get; set; }
}
Object:
{
"resource": "TRANSACTION",
"transaction": {
"0": {
"id": "1409",
"datetime_operacao": "30/06/2018 08:06:50",
"logico_terminal": "524889882",
"ref_EC": "RODRIGO",
"valor_operado": "0,00",
"parcelas": "",
"tipo_operacao": "",
"parsed_type": "",
"parsed_status": "",
"card_holder_name": "",
"cardmask": "******",
"bandeira": "",
"antecipacao_auto": "Não",
"nsu": "4145-0-0"
},
"1": {
"id": "1408",
"datetime_operacao": "30/06/2018 08:06:40",
"logico_terminal": "524889882",
"ref_EC": "RODRIGO",
"valor_operado": "0,00",
"parcelas": "",
"tipo_operacao": "",
"parsed_type": "",
"parsed_status": "",
"card_holder_name": "",
"cardmask": "******",
"bandeira": "",
"antecipacao_auto": "Não",
"nsu": "4141-0-0"
},
"2": {
"id": "1407",
"datetime_operacao": "30/06/2018 08:06:29",
"logico_terminal": "524889882",
"ref_EC": "RODRIGO",
"valor_operado": "0,00",
"parcelas": "",
"tipo_operacao": "",
"parsed_type": "",
"parsed_status": "",
"card_holder_name": "",
"cardmask": "******",
"bandeira": "",
"antecipacao_auto": "Não",
"nsu": "4131-0-0"
},
{ "Resource": "TRANSACTION", "transaction": { "0": { "id": "1409", "datetime_operation": "30/06/2018 08:06:50", "logico_terminal": "524889882", "ref_EC": "RODRIGO", "valor_operated": "0,00", "parcels": ", "typo_operation": "", "parsed_type": "", "parsed_status": "", "card_holder_name": "", "cardmask": "******", "flag": "", "antecipaca_auto": "No", "nsu": "4145-0-0" },
– Josias Oliveira
Post a valid json. what you posted this unusual.
– William John Adam Trindade
Your JSON appears to be invalid. Please use this site to check https://jsonformatter.curiousconcept.com/
– echojn
Flagged as duplicate. Friend, kindly post the code as far as you have done (part of the deserialization) and what error you receive.
– Gustavo Santos