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.
10 Replies
probably parameter name
roomSlug
should be slug
I changed that in the jsonfile but it still didn’t work
the param name in the class, not the json
So I can’t change it in the json file?
as long as the field name is the same everywhere it's ok
hm, i cant seem to solve it
isnt this strange
i solved it
the parameters in the constructor apparently had to be the same as in the json file
makes sense