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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:22:11+00:00 2026-06-14T15:22:11+00:00

I am developing an application in which i am using data came from server

  • 0

I am developing an application in which i am using data came from server in the json format.
However i am able to parse normal json data but failed to parse the json data with arrays,

the json response is given below,

[{"id_user":"80","services":
    [{"idservice":"3","title":"dni-e","message":"Texto para el dni-e"},
     {"idservice":"4","title":"Tarjeta azul","message":"Texto para la tarjeta azul"}]
}]

how can i read this json array?

Note:I am using Litjson for parsing.

  • 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-14T15:22:12+00:00Added an answer on June 14, 2026 at 3:22 pm

    You should create yourselft following POCO objects:

    public class Service
    {
        public int idservice { get; set; }
    
        public string title { get; set; }
    
        public string message { get; set; }
    }
    
    public class UserServices
    {
        public int id_user { get; set; }
    
        public List<Service> services { get; set; }
    }
    

    LitJSON will deserialize this out-of-the-box:

    UserServices services = JsonMapper.ToObject<UserServices>(rawJson);
    

    As an alternative you can use non-generic variant (below sample would wrote all data to the console):

    JsonData data = JsonMapper.ToObject(rawJson);
    Console.WriteLine("User id: {0}", data["id_user"]);
    Console.WriteLine("Services:");
    for (int i = 0; i < data["services"].length; i++)
    {
        Console.WriteLine ("    Id: {0}; Title: {1}; Message {2}", data["services"][i]["idservice"], data["services"][i]["title"], data["services"][i]["message"]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an Android application which sends content to a server using rest web
i am developing application which send and receive data between two computers but there
I'am developing an application which is totally based on fetching data from web services.
I'm developing an application which queries data from the host, and then inserts them
I am developing one application which is connecting to server to get some data.
I'm developing a Symfony2 application which uses a few forms. The data from the
I am developing an application in which I am using GET REST call to
I am developing an application in which i am using location service. Basically that
I'm developing an application which draws some charts and I'm using Google Chart. After
I am developing an iPad application by which i am using image context to

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.