C
C#2y ago
barcode

ASP.NET JSON conversion issues

Hello, for some reason asp.net is not serializing my response object correctly, in my request I return an object which has an object City which has object Country inside of it, when I debug at return it returns country correctly but in postman response doesn't receive it
{
"id": 1,
"name": "",
"description": ".",
"shortDescription": "u.",
"rating": 0,
"reviewCount": 2,
"imageUrl": "",
"website": null,
"squareMeters": null,
"longitude": 2,
"latitude": 2,
"address": "",
"dailyPass": null,
"monthlyPass": null,
"phoneNumber": null,
"createdAt": "2023-07-09T20:21:04.457564Z",
"chain": {
"id": 1,
"name": "x"
},
"city": {
"id": 1,
"name": "Belgrade"
},
"standardWorkingWeek": {
"monday": {
"opens": 0,
"closes": 0
},
"tuesday": {
"opens": 0,
"closes": 0
},
"wednesday": {
"opens": 0,
"closes": 0
},
"thursday": {
"opens": 0,
"closes": 0
},
"friday": {
"opens": 0,
"closes": 0
},
"sunday": {
"opens": 0,
"closes": 0
},
"saturday": {
"opens": 0,
"closes": 0
}
},
"specialWorkingTimes": []
}
{
"id": 1,
"name": "",
"description": ".",
"shortDescription": "u.",
"rating": 0,
"reviewCount": 2,
"imageUrl": "",
"website": null,
"squareMeters": null,
"longitude": 2,
"latitude": 2,
"address": "",
"dailyPass": null,
"monthlyPass": null,
"phoneNumber": null,
"createdAt": "2023-07-09T20:21:04.457564Z",
"chain": {
"id": 1,
"name": "x"
},
"city": {
"id": 1,
"name": "Belgrade"
},
"standardWorkingWeek": {
"monday": {
"opens": 0,
"closes": 0
},
"tuesday": {
"opens": 0,
"closes": 0
},
"wednesday": {
"opens": 0,
"closes": 0
},
"thursday": {
"opens": 0,
"closes": 0
},
"friday": {
"opens": 0,
"closes": 0
},
"sunday": {
"opens": 0,
"closes": 0
},
"saturday": {
"opens": 0,
"closes": 0
}
},
"specialWorkingTimes": []
}
1 Reply
barcode
barcodeOP2y ago
Has anyone had a similar issue? I don't know what to google oh... I forgot to put get set on complex object

Did you find this page helpful?