How to deserialize JSON like a normal person
How does one deserialize big nested json without making ton of wrapper classes or whatever. Or where do I put these classes to not make a mess in my project?
3 Replies
what kind of wrapper classes? writing models that match the shape of the json is the recommended practice
and you only need to write models for the parts you care about. if an object has 40 props but you only care about one of them, you only model that one prop
You basically got two choices: Make the classes for the things you want deserialized, or load it into JTokens and suffer.