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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:01:28+00:00 2026-05-31T16:01:28+00:00

I have a problem with deserializing JSON data from an external REST service. Depending

  • 0

I have a problem with deserializing JSON data from an external REST service. Depending on the request, I get the information wrapped in one, two or even three layers of wrappers. An example is:

{
  programsResponse: {
     programs: [
         {
           id: 1283,
           name: "program name"
         },
         {
           id: 1234,
           name: "another program name"
         }
     ]
  }
}

This is one of the simplest examples I could come up with, but if you toss another wrapper around this, you’ll see how this can get kind of complicated.

One of the ways I’ve solved this before is to make a ton of wrapper-classes, but it feels like the biggest hack ever. Is there any way to deserialize, let’s say, from a specified element-name? I know that DataContractJsonSerializer has a constructor for just this in .net 4, but not for Windows Phone. Any ideas as to how I can do this? I’m open for using RestSharp, but I haven’t found a way to do this there as well.

In the case of my example, I DO have a Program model to consume the data.

Any help would be greatly appreciated!

  • 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-31T16:01:29+00:00Added an answer on May 31, 2026 at 4:01 pm

    You could do it using JSON.NET (RestSharp depends on it) and JObject from it. Here is a good article: http://james.newtonking.com/pages/json-net.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF REST Service which accepts a JSON string One of the
I'm having some trouble with GSON, mainly deserializing from JSON. I have the following
I've recently started using GSON library for deserializing JSON that comes from web service
I have a problem deserializing a JSON string using Jackson (but I have no
I have problem when I try insert some data to Informix TEXT column via
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
Hey, I am having a problem deserializing base64 json back into the .net object
I have a problem deserializing some XML; the XML supplied by a third party
I have a problem Deserialising a JSON string to a List the TCProject is
We have a problem with deserializing an exception. I am fully aware that it's

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.