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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:29:59+00:00 2026-05-27T18:29:59+00:00

At the the moment i can correctly parse a JSON like this: assignments:[{ +

  • 0

At the the moment i can correctly parse a JSON like this:

"assignments:[{"
    + "'id': '111',"
    + "'erporder_erpid' : '132',"
    + "'dtStart' : '10:00 12-12-12',"
+ "}]"; 

with GSON. But I don’t know the appropriate way to parse multiple objects like:

"assignments:[{"
    + "'id': '111',"
    + "'erporder_erpid' : '132',"
    + "'dtStart' : '10:00 12-12-12',"
+ "},"
+ "{"
    + "'id': '111',"
    + "'erporder_erpid' : '132',"
    + "'dtStart' : '10:00 12-12-12',"
+ "}]"

I have a correctly set up Javabean.

  • 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-27T18:30:00+00:00Added an answer on May 27, 2026 at 6:30 pm
    {
    "assignments:[{"
            + "'id': '111',"
            + "'erporder_erpid' : '132',"
            + "'dtStart' : '10:00 12-12-12',"
        + "},"
        + "{"
            + "'id': '111',"
            + "'erporder_erpid' : '132',"
            + "'dtStart' : '10:00 12-12-12',"
        + "}]"
    }
    

    Objectclass.java

    public class takeData {
    public List<assignmentsData> assignments;
    
    
        public List<assignmentsData> getAssignments() {
            return assignments;
        }
    
        public void setAssignments(List<assignmentsData> assignments) {
            this.assignments = assignments;
        }
    }
    

    assignmentsData.java

    public class assignmentsData {
        public String id="";
        public String erporder_erpid="";
        public String dtStart="";
    
    
        public String getId() {
            return id;
        }
    
        public void setId(String id) {
            this.id = id;
        }
    
        public String getErporder_erpid() {
            return erporder_erpid;
        }
    
        public void setErporder_erpid(String erporder_erpid) {
            this.erporder_erpid = erporder_erpid;
        }
    
        public String getDtStart() {
            return dtStart;
        }
    
        public void setDtStart(String dtStart) {
            this.dtStart = dtStart;
        }
    }
    

    parsingClass.java

    Gson mGson= new Gson();
    Objectclass mObjectclass=gson.fromJson(jsonString, Objectclass.class);
    

    Access :mObjectclass.getAssignments.get(0).getId();

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

Sidebar

Related Questions

Sorry I can't put this code live anywhere at the moment but hopefully the
Maybe I am having a moment of 'afternoon', but can anyone explain why I
This is a very trivial problem but I can't seem to find a way
I recently started learning JavaFX. At the moment I can't build any JavaFX project
Hallo, How can I calculate a current time moment + exactly one week? The
Perhaps I'm having a Post-Ballmer-Peak Moment . I'm hoping that someone can help point
At the moment we use HSQLDB as an embedded database, but we search for
At the moment, our application uses the Trident Win32 component, but we want to
At this moment I cannot make changes to the code behind for a few
I got a JViewport correctly scrolling using the default layout manager (using viewport.setViewPosition), but

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.