aay jay

aay jay

  • NA
  • 85
  • 0

csharp class adding object

May 7 2020 6:39 PM
I need to POST to API server like following
with extra field "UserObj"
Json from postman
{
"CompanyCode": "tkf",
"YardNumber": "01",
"UserObj":{
"LotNumber": "9003",
"PenNumberOriginal": "330",
"HomePenNumber": "330",
"PenNumberDeathPen": "HSP2",
"InError": false,
"CodeDesc": "ACIDOSIS",
}
}
how can arrange my ListFields class so make it jason way
so far I have done
var queryPram = new QueryPram()
{
CompanyCode = "abc",
YardNumber = "01",
"DeadsObj" = new ListFields
{
LotNumber = "9003",
PenNumberOriginal = "330",
HomePenNumber = "330",
PenNumberDeathPen = "HSP2",
"InError": false,
"CodeDesc": "ACIDOSIS"
},
IsReversal: false
};
is not working can some please help me correct the queryPram object
Any help will be really appriciated

Answers (1)