java - Modifying all the string primitives in a JSON structure -


in java, given textual representation of json object, how can apply function leaves strings?

for example, converting string values upper case:
input:

{     "name": "john",     "address": {         "street": "elm",         "number": 4     },     "children": ["george", "paul"] } 

output:

{     "name": "john",     "address": {         "street": "elm"         "number": 4     },     "children": ["george", "paul"] } 

use gson (or other json parser) parse data map, remove non strings, serialize json using gson


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -