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 8453651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:49:07+00:00 2026-06-10T11:49:07+00:00

I am getting the JSON request from http://www.viki.com/api/v2/channels.json Now, I have the following classes

  • 0

I am getting the JSON request from http://www.viki.com/api/v2/channels.json

Now, I have the following classes from JSON:

public class RootObject
{
    public int id { get; set; }
    public string title { get; set; }
    public string description { get; set; }
    public string uri { get; set; }
    public List<Episode> episodes { get; set; }
    public Thumbnails2 thumbnails { get; set; }
    public string timestamp { get; set; }
    public List<object> genres { get; set; }
    public string origin_code { get; set; }
}

public class Thumbnails2
{
    public string c_220_160 { get; set; }
    public string c_102_102 { get; set; }
    public string c_180_130 { get; set; }
    public string c_110_80 { get; set; }
    public string xl { get; set; }
    public string large { get; set; }
    public string medium { get; set; }
    public string small { get; set; }
    public string c_320_300 { get; set; }
    public string c_640_600 { get; set; }
    public string c_95_70 { get; set; }
    public string c_190_140 { get; set; }
    public string c_280_200 { get; set; }
    public string c_560_400 { get; set; }
}

Now I want to get the Values from large and medium in Thumbnails2 and all the episodes in List.

I tried with:

using (var wc = new WebClient())
{
  var json = wc.DownloadString(jsonRequestURL);

  dynamic vikiDesrialized = JsonConvert.DeserializeObject(json);
  foreach (var item in vikiDesrialized)
  {
     //Console.WriteLine(item.title);

     foreach (var thumnails in item.thumbnails)
     {
          JsonConvert.DeserializeObject(thumbNails);
     }
  }
}

But getting an exception which implies something else:

‘The invocation of the constructor on type ‘Viki.MainWindow’ that matches the specified binding constraints threw an exception.’
Line number ‘3’ and line position ‘9’.

Can I have those values using LINQ?

  • 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-06-10T11:49:08+00:00Added an answer on June 10, 2026 at 11:49 am

    You don’t need the second deserialization JsonConvert.DeserializeObject(thumbNails);

    either use

    foreach (var item in dynObj)
    {
        Console.WriteLine(item.title);
        Console.WriteLine(item.thumbnails.small);
    }
    

    or

    using (var wc = new WebClient())
    {
        var json = wc.DownloadString("http://www.viki.com/api/v2/channels.json");
        var rootObj = JsonConvert.DeserializeObject<RootObject[]>(json);
    
        var obj = rootObj.Select(r=>new 
                    {
                        Title = r.title,
                        Thumbnail = r.thumbnails.small
                    }).ToArray();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting a garbled JSON string from a HTTP request, so I'm looking for
I am getting json response from this google api service to get reverse geo
I am getting JSON string from website. I have data which looks like this
I have a jersey client that is getting JSON from a source that I
I am having trouble getting some data from a JSON object which I have
I am trying to parse json from a request, but I keep getting null.
I would like to to get fetch JSON from http://mycompany.com/jsonpage1..etc . The webserver requires
I would like to to get fetch JSON from http://mycompany.com/page1...http://mycompany.com/page2 ... On the the
I'm having trouble getting the server to recognize a JSON POST request since I
Getting Json from the Server and displaying it in the grid is relatively straight

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.