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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:22:46+00:00 2026-06-01T05:22:46+00:00

I use JSON.NET and I would like to parse the following object which I

  • 0

I use JSON.NET and I would like to parse the following object which I get from a WebService. Can someone post an example on how to do that?

@"{""MessageType"":0,
   ""Message"":""Success"",
   ""Value"":[
              {""listId"":1,
               ""listName"":""DemoList"",
               ""itemInList"":[
                    {
                     ""fromDate"":""\/Date(1228946400000)\/"",
                     ""fromLocation"":null,
                     ""toLocation"":null,
                     ""originalRequest"":""water"",
                     ""creationDate"":""\/Date(1339448400000)\/"",
                     ""typeId"":1
                    },
                    {
                     ""fromDate"":null,
                     ""fromLocation"":null,
                     ""toLocation"":null,
                     ""originalRequest"":""gala"",
                     ""creationDate"":""\/Date(1304370000000)\/"",
                     ""typeId"":1
                    }
              ]}
    ]}"

JSON Object

{
  "MessageType":0,
  "Message":"UserLists",
  "Value":
          [
            {
              "listId":1,
              "listName":"DemoList",
              "itemInList" 
                    [
                      {
                         "fromDate":"\/Date(1228946400000)\/",
                         "fromLocation":null,
                         "toLocation":null,
                         "originalRequest":"water",
                         "creationDate":"\/Date(1339448400000)\/",
                         "typeId":1
                      },
                      {
                         "fromDate":null,
                         "fromLocation":null,
                         "toLocation":null,
                         "originalRequest":"gala",
                         "creationDate":"\/Date(1304370000000)\/",
                         "typeId":1
                       }
                  ],
                  "numberOfItems":2
              }
          ]
     }

Thanks.

  • 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-01T05:22:47+00:00Added an answer on June 1, 2026 at 5:22 am

    You need to create some entity like this:

    public class Entity
    {
        public int MessageType { get; set; }
        public string Message { get; set; }
        public List<EntityValue> Value { get; set; }
    }
    
    public class EntityValue
    {
        public int listId { get; set; }
        public string listName { get; set; }
        public List<ItemInList> itemInList { get; set; }
    }
    
    public class ItemInList
    {
        public DateTime? fromDate { get; set; }
        public string fromLocation { get; set; }
        public string toLocation { get; set; }
        public string originalRequest { get; set; }
        public DateTime creationDate { get; set; }
        public int typeId { get; set; }
    }
    

    The entity must has the same structure like the json data.
    And you can call the Method:

    JsonConvert.DeserializeObject<Entity>(json);
    

    If it has any exception,you need to adjust the entities until it works.

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

Sidebar

Related Questions

Can someone explain how to use JSON-RPC.net in my application for windows phone. When
I'm using ASP.NET MVC and would like to get Model information for use within
I am testing out json.net . I would like to use its linq-to-json syntax
I would like to use Lift-JSON (v2.2) with Play framework to parse a JSON
I started to use Json.NET to convert a string in JSON format to object
I use json-rpc client from json-rpc.net in my windows phone application. Code: var client
When working with JSON, I can use NuGet to add JSON.Net and this allows
I am querying data from http://www.imdbapi.com and would like to parse the result using
I'm trying to parse some huge JSON file (like http://eu.battle.net/auction-data/258993a3c6b974ef3e6f22ea6f822720/auctions.json ) using gson library
I wish to use JSON.Net on a brand spankin new Mono class library (say

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.