- 1.7k
- 2
- 21
- 34
- 3k
- 6
- 40
- 62
I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the string can look like:
{'title': 'Computing'ComputingandInformationsystems',
and Information systems','id':1,'children': 'true','groups':
'groups': [{'title': 'Level'LeveloneCIS',
one CIS','id':2,'children': 'true','groups':[{'title': 'Intro'IntroToComputingandInternet',
To Computing and Internet','id':3,'children': 'false','groups':[]}]}]}
In this string every JSON object contains an array of other JSON objects. The intention is to extract a list of IDs where any given object possessing a group property that contains other JSON objects. I looked at Google's Gson as a potential JSON plugin. Can anyone offer some form of guidance as to how I can generate Java from this JSON string?
I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the string can look like:
{'title': 'Computing and Information systems','id':1,'children': 'true','groups':
[{'title': 'Level one CIS','id':2,'children': 'true','groups':[{'title': 'Intro To Computing and Internet','id':3,'children': 'false','groups':[]}]}]}
In this string every JSON object contains an array of other JSON objects. The intention is to extract a list of IDs where any given object possessing a group property that contains other JSON objects. I looked at Google's Gson as a potential JSON plugin. Can anyone offer some form of guidance as to how I can generate Java from this JSON string?
I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the string can look like:
{'title': 'ComputingandInformationsystems',
'id':1,'children': 'true',
'groups': [{'title': 'LeveloneCIS',
'id':2,'children': 'true','groups':[{'title': 'IntroToComputingandInternet',
'id':3,'children': 'false','groups':[]}]}]}
In this string every JSON object contains an array of other JSON objects. The intention is to extract a list of IDs where any given object possessing a group property that contains other JSON objects. I looked at Google's Gson as a potential JSON plugin. Can anyone offer some form of guidance as to how I can generate Java from this JSON string?
- 3.3k
- 4
- 35
- 46