C
C#6mo 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
Hampus6mo ago
No description
life grinder
life grinder6mo ago
probably parameter name roomSlug should be slug
Hampus
Hampus6mo ago
I changed that in the jsonfile but it still didn’t work
life grinder
life grinder6mo ago
the param name in the class, not the json
Hampus
Hampus6mo ago
So I can’t change it in the json file?
life grinder
life grinder6mo ago
as long as the field name is the same everywhere it's ok
Hampus
Hampus6mo ago
hm, i cant seem to solve it
Hampus
Hampus6mo ago
No description
Hampus
Hampus6mo ago
No description
Hampus
Hampus6mo 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