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

  • Home
  • SEARCH
  • 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 8942631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:33:45+00:00 2026-06-15T11:33:45+00:00

Using C# and Visual Studio 2010 (Windows Form Project), InstaSharp and Newtonsoft.Json libraries. I

  • 0

Using C# and Visual Studio 2010 (Windows Form Project), InstaSharp and Newtonsoft.Json libraries.

I want to get the image url from the JSON string returned to me by the Endpoint Instagram API when I request for a particular hashtag.

I can so far retrive the JSON string.

I am trying to use Newtonsoft.Json to deserialize the object using the examples, but I probably dont understand the JSON string representation of the object properly.

Below is a simplified sample response I get from the api call tags/tag-name/media/recent from their documentation. source here

{
    "data": [{
        "type": "image",
        "filter": "Earlybird",
        "tags": ["snow"],
        "comments": {
        }
        "caption": {
        },
        "likes": {
        },
        "created_time": "1296703536",
        "images": {
            "low_resolution": {
                "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_6.jpg",
                "width": 306,
                "height": 306
            },
            "thumbnail": {
                "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_5.jpg",
                "width": 150,
                "height": 150
            },
            "standard_resolution": {
                "url": "http://distillery.s3.amazonaws.com/media/2011/02/02/f9443f3443484c40b4792fa7c76214d5_7.jpg",
                "width": 612,
                "height": 612
            }
        },
        "id": "22699663",
        "location": null
    },
    ...
    ]
}

I want to get specifically the standard_resolution in the images part.

This is the revelevant code that I currently have.

//Create the Client Configuration object using Instasharp
var config = new InstaSharp.Endpoints.Tags.Unauthenticated(config);

//Get the recent pictures of a particular hashtag (tagName)
var pictures = config.Recent(tagName);

//Deserialize the object to get the "images" part
var pictureResultObject = JsonConvert.DeserializeObject<dynamic>(pictureResult.Json);
            consoleTextBox.Text = pictureResult.Json;
            var imageUrl = pictureResultObject.Data.Images;
            Console.WriteLine(imageUrl);

I get the error: Additional information: Cannot perform runtime binding on a null reference

so imageUrl is indeed null when I debug, hence indicating I am not accessing it the right way.

Anyone can explain to me how to access different parts of this JSON String using Newtonsoft.Json?

  • 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-15T11:33:46+00:00Added an answer on June 15, 2026 at 11:33 am

    Using Newtonsoft.Json

    dynamic dyn = JsonConvert.DeserializeObject(json);
    foreach (var data in dyn.data)
    {
        Console.WriteLine("{0} - {1}",
                data.filter,
                data.images.standard_resolution.url);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a Windows Form Application in Visual Studio 2010, i.e., using .Net
I have created a project in Visual Studio using a Windows Form application C#.
I'm using Visual Studio 2010 to create a C# Windows Form application. In the
I'm programming in C++ using Visual Studio 2010 using a Windows Form to create
I am using visual studio 2010 my project is that, i want to encrypt
I am creating Windows Application Form using Visual Studio 2010. For now, I am
I'm using Visual Studio 2010 and I'm working on a windows application form. I'm
I am creating a C# windows form application using Visual Studio 2010. The end
I'm using visual studio 2010 do developt my Windows phone application! I'm newbie and
I'm running Windows 7 Ultimate (64 bit) using Visual Studio 2010 RC. I recently

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.