Hide Clipart | Topics | Search
Log Out | Register | Edit Profile
Last 30 mins | 1 | 2

Calling JSON experts

Chalanachithram.com DB » New TF Industry Related » Archive through October 29, 2014 » Calling JSON experts « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Abhysg
Hero
Username: Abhysg

Post Number: 18911
Registered: 08-2008
Posted From: 69.248.70.203

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 07:12 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Emc2:

mav abhi babu ni follow ayipo

entha sepu DB lo janala daggara teesukuno 4 remotes projects chesthavu,

janala ki kuda helping cheyyi





naa peru meeda 116 INR/USD edo oka punya karyaniki donate seste salu....
Top of pagePrevious messageNext messageBottom of page Link to this message

Idle_yzag
Legend
Username: Idle_yzag

Post Number: 38089
Registered: 02-2008
Posted From: 184.219.150.249

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 07:01 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

JSONParser jsonParser = new JSONParser();

JSONObject jsonObject = (JSONObject) jsonParser.parse(<json>);
JSONArray jlist = (JSONArray ) jsonObject.get("list")
JSONObject json2ndObject = (JSONObject) jsonParser.parse(jlist.get(0));

JSONArray jstate = (JSONArray ) json2ndObject.get("state")


ee vidamga mundhukipovali
JP/Chiru
Top of pagePrevious messageNext messageBottom of page Link to this message

Bingo
Junior Artist
Username: Bingo

Post Number: 101
Registered: 11-2012
Posted From: 76.106.195.70

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 05:12 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Emc2:




public class Object1{
private List<object2> list;

public List<object2> getList()...

public void setList(List<object2> list)...
}


public class Object2{
private String name;
private String distribution;
private String theme;
private List<state> state;
private String priority;
private String capacity;
private String threshold;
///private List<> apps ???? JSON data looks incorrect


//getters and setters
}


public class State{
private String name;
private String type;
private String previous;
private String progress;

}

NOw if you convert Object1 into JSON, you will get the JSON string in your note. There is something wrong with the "apps" part of that string..
Top of pagePrevious messageNext messageBottom of page Link to this message

Idle_yzag
Legend
Username: Idle_yzag

Post Number: 38088
Registered: 02-2008
Posted From: 74.82.64.161

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 05:03 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Square brackets in jsonarray ki assign cheyali, rest all json objects you refer with key to get value
JP/Chiru
Top of pagePrevious messageNext messageBottom of page Link to this message

Botsa_fan
Side Hero
Username: Botsa_fan

Post Number: 5633
Registered: 07-2013
Posted From: 158.48.6.139

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 04:50 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

what abt these [ brackets


avi arrays anukonata.
Sharabha Sharabha..0/18 rest Prathipadu bi-ections and agadu hype.
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 54441
Registered: 01-2008
Posted From: 98.222.238.98

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 04:31 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Cocanada:


what abt these [ brackets?
Happy Vizag
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48027
Registered: 01-2008
Posted From: 63.79.91.20

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 04:31 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:


madhya lo json arrays endi..ala unnayi
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48026
Registered: 01-2008
Posted From: 63.79.91.20

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 04:30 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

obj1:{
obj2:{
obj3:{
}

}

}
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 54440
Registered: 01-2008
Posted From: 98.222.238.98

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 04:16 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

how to get something like this for state and apps which ar embeded

{ "list": [
{
"name": "test01",
"distribution": "xxx",
"theme": "Production",
"state": [
"name": "Online",
"type": "Normal",
"previous": "NA",
"progress": "100"
]
"priority": "3",
"capacity": "172 TB",
"threshold": "60",
"apps": [
"app1",
"app2",
"app3"
]

}
]
}
Happy Vizag
Top of pagePrevious messageNext messageBottom of page Link to this message

Emc2
Legend
Username: Emc2

Post Number: 36454
Registered: 03-2008
Posted From: 128.229.4.22

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 04:00 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

mav abhi babu ni follow ayipo

entha sepu DB lo janala daggara teesukuno 4 remotes projects chesthavu,

janala ki kuda helping cheyyi
Top of pagePrevious messageNext messageBottom of page Link to this message

Goonda
Megastar
Username: Goonda

Post Number: 24415
Registered: 02-2007
Posted From: 75.66.158.123

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 03:58 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Abhysg:


yours is right.
Top of pagePrevious messageNext messageBottom of page Link to this message

Abhysg
Hero
Username: Abhysg

Post Number: 18905
Registered: 08-2008
Posted From: 107.77.76.56

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 03:34 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Same like java objects

Person : {name: abhy; address : {line1:123 st name; cith:edison } }

Similar to this anukonta
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 54438
Registered: 01-2008
Posted From: 108.171.131.189

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 03:31 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

JSON object in json object in a json object?


sorry..

one json obj in another json obj..not 3 level nested
Happy Vizag
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 54437
Registered: 01-2008
Posted From: 108.171.131.189

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 29, 2014 - 03:29 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

whats the correct way to embed JSON object in json object in a json object? evarina respond aite i can post the format i want
Happy Vizag

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x94972dc){Movie Clipart}
Show / hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: