从路径'track [40] .like_count获取转换器值{null}?

时间:2015-06-17 07:52:15

标签: c# json soundcloud

类型

的例外
  

'Newtonsoft.Json.JsonSerializationException'发生在   Newtonsoft.Json.DLL但未在用户代码中处理

     

其他信息:将值{null}转换为类型时出错   'System.Boolean'。路径'收集[8] .downloadable',第1行,位置   22866

  来自路径'track [40] .like_count

转换器值{null}

我用Json。如何解决?

public class User
    {
        public string full_name { get; set; }
        public string country { get; set; }
        public string city { get; set; }
        public int tracks_count { get; set; }
        public int followers_count { get; set; }
        public int followings_count { get; set; }
        public int public_favorites_count { get; set; }
        public int groups_count { get; set; }
        public string description { get; set; }
        public string plan { get; set; }
        public int id { get; set; }
        public string uri { get; set; }
        public string username { get; set; }
        public string kind { get; set; }
        public string permalink { get; set; }
        public string permalink_url { get; set; }
        public string first_name { get; set; }
        public string avatar_url { get; set; }
        public string last_modified { get; set; }
    }

    public class __invalid_type__0
    {
        public string urn { get; set; }
        public int entry_time { get; set; }
        public string visual_url { get; set; }
        public object link { get; set; }
    }

    public class Visuals2
    {
        public __invalid_type__0 __invalid_name__0 { get; set; }
    }

    public class Visuals
    {
        public string urn { get; set; }
        public bool enabled { get; set; }
        public Visuals2 visuals { get; set; }
        public object tracking { get; set; }
    }

    public class Collection
    {
        public User user { get; set; }
        public int user_id { get; set; }
        public string genre { get; set; }
        public string tag_list { get; set; }
        public int duration { get; set; }
        public bool downloadable { get; set; }
        public bool streamable { get; set; }
        public int original_content_size { get; set; }
        public bool commentable { get; set; }
        public string sharing { get; set; }
        public bool @public { get; set; }
        public string created_at { get; set; }
        public string updated_at { get; set; }
        public string isrc { get; set; }
        public string state { get; set; }
        public bool embeddable { get; set; }
        public string embeddable_by { get; set; }
        public string license { get; set; }
        public string waveform_url { get; set; }
        public bool feedable { get; set; }
        public string label_name { get; set; }
        public string release_date { get; set; }
        public bool has_downloads_left { get; set; }
        public string purchase_title { get; set; }
        public string purchase_url { get; set; }
        public string policy { get; set; }
        public string monetization_model { get; set; }
        public Visuals visuals { get; set; }
        public string permalink { get; set; }
        public string title { get; set; }
        public string description { get; set; }
        public string track_type { get; set; }
        public string last_modified { get; set; }
        public string artwork_url { get; set; }
        public int id { get; set; }
        public string kind { get; set; }
        public int comment_count { get; set; }
        public int download_count { get; set; }
        public string uri { get; set; }
        public string stream_url { get; set; }
        public int playback_count { get; set; }
        public string download_url { get; set; }
        public object secret_token { get; set; }
        public int reposts_count { get; set; }
        public string permalink_url { get; set; }
        public int likes_count { get; set; }
    }

    public class Facet2
    {
        public string filter { get; set; }
        public int count { get; set; }
        public string value { get; set; }
    }

    public class Facet
    {
        public string name { get; set; }
        public List<Facet2> facets { get; set; }
    }

    public class RootObject
    {
        public List<Collection> collection { get; set; }
        public List<Facet> facets { get; set; }
        public int total_results { get; set; }
        public string qid { get; set; }
        public string query_urn { get; set; }
        public string next_href { get; set; }
    }

0 个答案:

没有答案