C
C#12mo ago
Hampus

Deserialization of json object

I have this method and im trying to deserialize it into the JsonData class. ill send images of the method, as well as the error im getting. I'll also post images of what im trying to deserialize it into, as well as the data that is in the json file.
No description
No description
No description
No description
No description
10 Replies
Hampus
HampusOP12mo ago
No description
Omnissiah
Omnissiah12mo ago
probably parameter name roomSlug should be slug
Hampus
HampusOP12mo ago
I changed that in the jsonfile but it still didn’t work
Omnissiah
Omnissiah12mo ago
the param name in the class, not the json
Hampus
HampusOP12mo ago
So I can’t change it in the json file?
Omnissiah
Omnissiah12mo ago
as long as the field name is the same everywhere it's ok
Hampus
HampusOP12mo ago
hm, i cant seem to solve it
Hampus
HampusOP12mo ago
No description
Hampus
HampusOP12mo ago
No description
Hampus
HampusOP12mo ago
isnt this strange i solved it the parameters in the constructor apparently had to be the same as in the json file makes sense
Want results from more Discord servers?
Add your server