Menu

using json-lib

Michel
2012-02-21
2013-04-29
  • Michel

    Michel - 2012-02-21

    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

     
  • Michel

    Michel - 2012-02-27

    I've found :
    tabMsg = json.getJSONArray("MESSAGES");

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.