jsonconvert.deserializeobject returns null

后端 未结 1 1658
予麋鹿
予麋鹿 2021-01-26 12:48

I\'m trying to get coordinates from google maps when user enters 2 values of the address (for now) like city and street.Having trouble with deserialization of the Json string wh

相关标签:
1条回答
  • 2021-01-26 13:20

    You need to use another top-level class to deserialize responce Try this:

    public class Responce
    {
        public string status{get;set;}
        public List<Result> results {get;set;}
    }
    ...
    var responce = JsonConvert.DeserializeObject<Responce>(Jsonstring);
    DoSomething(responce.results);
    
    0 讨论(0)
提交回复
热议问题