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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:17:54+00:00 2026-06-17T20:17:54+00:00

I have Json String array ,which looks like this , { {name:214,value:true,Id:0}, {name:215,value:true,Id:0}, {name:216,value:true,Id:0}

  • 0

I have Json String array ,which looks like this ,

{ {name:"214",value:true,Id:0},
  {name:"215",value:true,Id:0},
  {name:"216",value:true,Id:0}
}

and want to covert this string to Json array object and iterate the list to read each object’s value. Then set values to corresponding dto and save it .
But i didnt find any good way to convert normal JSON array string to json array object.

I am not using google json , I want it to be done in normal json itself .Please help me

and java class i want something like this

JSONObject[] jsonObjectList = String after convert();

    for (JSONObject jsonObject : jsonObjectList) {
        System.out.println(" name is --"+jsonObject.get("name"));
        System.out.println(" value is ---"+jsonObject.get("value"));
        System.out.println(" id is ----"+jsonObject.get("id"));

    }
  • 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-17T20:17:55+00:00Added an answer on June 17, 2026 at 8:17 pm

    Here is the example for parsing json Object.. use JSON lib for this..

    import net.sf.json.JSONArray;
    import net.sf.json.JSONException;
    import net.sf.json.JSONObject;
    import net.sf.json.JSONSerializer;
    public class TestJson {
        public static void parseProfilesJson(String jsonStr) {
            try {
                JSONArray nameArray = (JSONArray) JSONSerializer.toJSON(jsonStr);
                System.out.println(nameArray.size());
                for(Object js : nameArray){
                    JSONObject json = (JSONObject) js;
                    System.out.println(json.get("date"));
                }
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
        public static void main(String[] args) {
            String s = "[{\"date\":\"2012-04-23\",\"activity\":\"gym\"},{\"date\":\"2012-04-24\",\"activity\":\"walking\"}]";
            parseProfilesJson(s);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a a JSON-encoded Array which looks like this (note: this is in
I have a JSON string that looks like this: { package1: { type: envelope,
I have a complex json array which I want to target a specific line/string
I have a json string like this: { d: { results: [ { __metadata:
I have a JSON string that I would like to include as a value
I have this json string: $row['medium'] = {\medium\:13|17|1|14, \medium_sub\:21}; now I want to make
I have a json array which is holding the correct string independent of language
I have an HTTP Server which responses with JSON strings. They look like this:
I have an array in the database and it looks like this: {hello:world, Test:[hello]}
Suppose I have a json string like this: { ... key1:value1; ... } with

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.