Deserialize JSON as object or array with JSON.Net [duplicate]
问题 This question already has answers here : How to handle both a single item and an array for the same property using JSON.net (7 answers) Closed 27 days ago . I want to know if it is possible to deserialize a JSON object that could either be an object or an array. Similar to this question: Jackson deserialize object or array But using JSON.Net. Example { "response": { "status":"success", // Could be either a single object or an array of objects. "data": { "prop":"value" } // OR "data": [ {"prop