Looking for org-json solutions only please **
Suppose you deal with a structure, as follows.
Using json-org, how can i get an array of Tests, if this entire json is represented in a String s?
Using Google's gson, it's easy to do by testing what type given object is ... i am missing something simple here with json-org libraries
{
"Groups":{
"Test":[
{
"Test Number":123456,
"Channel":"TEST",
"environment":"A",
"output event":[
{
"description":"very good description",
"value":123,
"active":true
},
{
"description":"another very good description",
"value":456,
"active":true
}
],
"active":true,
"instrument":"ABC"
},
{
"Test Number":547985,
"Channel":"some new channel",
"environment":"B",
"output event":[
{
"description":"reject",
"value":123,
"active":true
},
{
"description":"ack",
"value":456,
"active":true
}
],
"active":true,
"instrument":"XYZ"
}
],
"name":"A clever name",
"active":true
}
}