Hi,
I'm a beginner in Java ant I have to process a JSON message. like this :
{ 'MESSAGES': [ { 'msg':'N1F1', 'nature':'N1', 'famille':'F1', 'donnees': [ { 'np':'NP11', 'vp':'VP11'}, { 'np':'NP12', 'vp':'VP12'} ] }, { 'msg':'N2F2', 'nature':'N2', 'famille':'F2', 'donnees': [ { 'np':'NP21', 'vp':'VP21'}, { 'np':'NP22', 'vp':'VP22'} ] } ] }
I'm looking for exemples for how to access at one one the element of the array.
could you, please, give me some exemples ?
Thanks,
Michel
I've found : tabMsg = json.getJSONArray("MESSAGES");
Log in to post a comment.
Hi,
I'm a beginner in Java ant I have to process a JSON message. like this :
{ 'MESSAGES':
[ { 'msg':'N1F1',
'nature':'N1',
'famille':'F1',
'donnees':
[ { 'np':'NP11', 'vp':'VP11'},
{ 'np':'NP12', 'vp':'VP12'}
]
},
{ 'msg':'N2F2',
'nature':'N2',
'famille':'F2',
'donnees':
[ { 'np':'NP21', 'vp':'VP21'},
{ 'np':'NP22', 'vp':'VP22'}
]
}
]
}
I'm looking for exemples for how to access at one one the element of the array.
could you, please, give me some exemples ?
Thanks,
Michel
I've found :
tabMsg = json.getJSONArray("MESSAGES");