Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6912203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:03:44+00:00 2026-05-27T09:03:44+00:00

I’m working with NewsBlur API which returns a feed list. The response JSON is

  • 0

I’m working with NewsBlur API which returns a feed list. The response JSON is of type:

{
    "authenticated": true,
    "user": "sathyabhat",
    "feeds": {},
    "flat_folders": { },
    result: "ok"
}

where feeds: is of type

    "feeds": {
        "96705": {
            "feed_address": "http://www.linuxhaxor.net/",
            "updated": "8492 hours",
            "favicon_text_color": null,
            "subs": 35,
            "feed_link": "http://www.linuxhaxor.net/",
            "favicon_fetching": true,
            "nt": 0,
            "updated_seconds_ago": 30573336,
            "num_subscribers": 35,
            "feed_title": "LinuxHaxor.net",
            "favicon_fade": null,
            "exception_type": "feed",
            "exception_code": 503,
            "favicon_color": null,
            "active": true,
            "ng": 0,
            "feed_opens": 0,
            "id": 96705,
            "ps": 0,
            "has_exception": true
        },
        "768840": {
            "feed_address": "http://feeds.feedburner.com/PathikShahDotCom",
            "updated": "3 hours",
            "favicon_text_color": "black",
            "subs": 1,
            "feed_link": "http://www.pathikshah.com/blog",
            "favicon_fetching": false,
            "nt": 0,
            "updated_seconds_ago": 13043,
            "num_subscribers": 1,
            "feed_title": "Pathik Shah",
            "favicon_fade": "769456",
            "favicon_color": "b2d092",
            "active": true,
            "ng": 0,
            "feed_opens": 0,
            "id": 768840,
            "ps": 0
        },
        "768842": {
            "feed_address": "http://feeds.preshit.net/preshit/blog",
            "updated": "3 hours",
            "favicon_text_color": null,
            "subs": 1,
            "feed_link": "http://preshit.net",
            "favicon_fetching": false,
            "nt": 3,
            "updated_seconds_ago": 13536,
            "num_subscribers": 1,
            "feed_title": "Preshit Deorukhkar",
            "favicon_fade": null,
            "favicon_color": null,
            "active": true,
            "ng": 0,
            "feed_opens": 1,
            "id": 768842,
            "ps": 0
        },
        "768843": {
            "feed_address": "http://quizwith.net/feed/",
            "updated": "3 hours",
            "favicon_text_color": "white",
            "subs": 1,
            "feed_link": "http://quizwith.net",
            "favicon_fetching": false,
            "nt": 0,
            "updated_seconds_ago": 11617,
            "num_subscribers": 1,
            "feed_title": "quizwith.net",
            "favicon_fade": "c22900",
            "favicon_color": "fe6501",
            "active": true,
            "ng": 0,
            "feed_opens": 0,
            "id": 768843,
            "ps": 0
        }

[… so on ..]

    }

So essentially, it’s a list of feeds objects. Now, I’m trying to deserialize this into a C# object using JSON.net, but my class members are populated with null values.

My class is modelled on the response that I’m getting:

 public class FeedResponse
    {
   public string authenticated { get; set; }
   public string user { get; set; }
   public List<feed> feeds { get; set; }
   public string flat_folders { get; set; }
   public string result { get; set; }
}

public class feed
{
    public string feed_address { get; set; }
    public string updated { get; set; }
    public string favicon_text_color { get; set; }
    public int subs { get; set; }
    public string feed_link { get; set; }
    public bool favicon_fetching { get; set; }
    public string nt { get; set; }
    public string updated_seconds_ago { get; set; }
    public int num_subscribers { get; set; }
    public string feed_title { get; set; }
    public string favicon_fade { get; set; }
    public string exception_type { get; set; }
    public string exception_code { get; set; }
    public string favicon_color { get; set; }
    public bool active { get; set; }
    public string ng { get; set; }
    public int feed_opens { get; set; }
    public int id { get; set; }
    public bool has_exception { get; set; }

}

This is the line which attempts to deserialize( using RestSharp):

 return Execute<FeedResponse>(request);

Evidently, something goes wrong while trying to parse the JSON for the feed response.

Any pointers as to what I’m doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:03:45+00:00Added an answer on May 27, 2026 at 9:03 am

    Feeds is a Dictionary<int,Feed> not a List<Feed> (theres is Keys).

    edit: a little more details, a list of objects in json would look like that:

    [{ name: 'elem1'},
    { name: 'elem2'},
    { name: 'elem3'}]
    

    edit2: full sample working:

     using System; 
     using System.Collections.Generic; 
     using System.Linq;
     using System.Web.Script.Serialization;
    
     namespace JSON {
         class Program
         {
             static void Main(string[] args)
             {
                 var json = @"{
         ""authenticated"": true,
         ""user"": ""sathyabhat"",
         ""feeds"": {
             ""96705"": {
                 ""feed_address"": ""http://www.linuxhaxor.net/"",
                 ""updated"": ""8492 hours"",
                 ""favicon_text_color"": null,
                 ""subs"": 35,
                 ""feed_link"": ""http://www.linuxhaxor.net/"",
                 ""favicon_fetching"": true,
                 ""nt"": 0,
                 ""updated_seconds_ago"": 30573336,
                 ""num_subscribers"": 35,
                 ""feed_title"": ""LinuxHaxor.net"",
                 ""favicon_fade"": null,
                 ""exception_type"": ""feed"",
                 ""exception_code"": 503,
                 ""favicon_color"": null,
                 ""active"": true,
                 ""ng"": 0,
                 ""feed_opens"": 0,
                 ""id"": 96705,
                 ""ps"": 0,
                 ""has_exception"": true
             },
             ""768840"": {
                 ""feed_address"": ""http://feeds.feedburner.com/PathikShahDotCom"",
                 ""updated"": ""3 hours"",
                 ""favicon_text_color"": ""black"",
                 ""subs"": 1,
                 ""feed_link"": ""http://www.pathikshah.com/blog"",
                 ""favicon_fetching"": false,
                 ""nt"": 0,
                 ""updated_seconds_ago"": 13043,
                 ""num_subscribers"": 1,
                 ""feed_title"": ""Pathik Shah"",
                 ""favicon_fade"": ""769456"",
                 ""favicon_color"": ""b2d092"",
                 ""active"": true,
                 ""ng"": 0,
                 ""feed_opens"": 0,
                 ""id"": 768840,
                 ""ps"": 0
             },
             ""768842"": {
                 ""feed_address"": ""http://feeds.preshit.net/preshit/blog"",
                 ""updated"": ""3 hours"",
                 ""favicon_text_color"": null,
                 ""subs"": 1,
                 ""feed_link"": ""http://preshit.net"",
                 ""favicon_fetching"": false,
                 ""nt"": 3,
                 ""updated_seconds_ago"": 13536,
                 ""num_subscribers"": 1,
                 ""feed_title"": ""Preshit Deorukhkar"",
                 ""favicon_fade"": null,
                 ""favicon_color"": null,
                 ""active"": true,
                 ""ng"": 0,
                 ""feed_opens"": 1,
                 ""id"": 768842,
                 ""ps"": 0
             },
             ""768843"": {
                 ""feed_address"": ""http://quizwith.net/feed/"",
                 ""updated"": ""3 hours"",
                 ""favicon_text_color"": ""white"",
                 ""subs"": 1,
                 ""feed_link"": ""http://quizwith.net"",
                 ""favicon_fetching"": false,
                 ""nt"": 0,
                 ""updated_seconds_ago"": 11617,
                 ""num_subscribers"": 1,
                 ""feed_title"": ""quizwith.net"",
                 ""favicon_fade"": ""c22900"",
                 ""favicon_color"": ""fe6501"",
                 ""active"": true,
                 ""ng"": 0,
                 ""feed_opens"": 0,
                 ""id"": 768843,
                 ""ps"": 0
             }
         },
         ""flat_folders"": { },
         result: ""ok"" }";
    
                 var jsonSerializer = new JavaScriptSerializer();
                 var response = jsonSerializer.Deserialize<FeedResponse(json);
                 Console.Write(jsonSerializer.Serialize(response));
                 Console.ReadKey();
             }
         }
    
         public class FeedResponse
         {
             public bool authenticated { get; set; }
             public string user { get; set; }
             public Dictionary<string,feed> feeds { get; set; }
             public object flat_folders { get; set; }
             public string result { get; set; }
         }
    
         public class feed
         {
             public string feed_address { get; set; }
             public string updated { get; set; }
             public string favicon_text_color { get; set; }
             public int subs { get; set; }
             public string feed_link { get; set; }
             public bool favicon_fetching { get; set; }
             public string nt { get; set; }
             public string updated_seconds_ago { get; set; }
             public int num_subscribers { get; set; }
             public string feed_title { get; set; }
             public string favicon_fade { get; set; }
             public string exception_type { get; set; }
             public string exception_code { get; set; }
             public string favicon_color { get; set; }
             public bool active { get; set; }
             public string ng { get; set; }
             public int feed_opens { get; set; }
             public int id { get; set; }
             public bool has_exception { get; set; }
         } }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I'm making a simple page using Google Maps API 3. My first. One marker
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.