Hello. I apologize for the possibly stupid question, but I can’t figure out how to properly jamp the following json into some kind of model. Those. the Result object may be different depending on the query. Suppose there is a Response model:
public class Response { public string Version {get;set;} public int StatusCode {get;set;} public object Result {get;set;} } And there is a response:
{ "Version":"1.2.3", "StatusCode":200, "Result": { "Id":42, "QuestionText":"This is a test question", "QuestionImageUrl": "http://www.blah.com/test.png" } } If you perform this operation, then Result will be of type object, is it possible to somehow mate it into the desired model?
var result = JsonConvert.DeserializeObject<Response>(json);
public dynamic Result {get;set;}..? but, of course, I agree with VladD, the type of result is desirable to know. - Anton KomyshanJObject- Grundy