0

I changed the structure JSON files. I must change the value of a lot JSONs objects. Manually change to do their reading would take me a long time.

For example I have:

"Domain" {
"id": 0,
"name": "Domain of service",
"desc": "Registered service",
"conf": {
     "us": {
         "name": "US SP"
         "icon": "us.png"
        }
   "plsl": {
         "name": "PLSL SP"
         "icon": "plsl.png"
    }
 }

I want to this:

"Info": "Domain of service",
"rTypeID": "0",
"rTypeCode": "Domain",
"Name": "Domain of service",
"Description": "Registered service",
"RepositoryObject": [ {
"rCode:" "us",
"name:" "US PA",
"description:" "",
"sValue:" "us.png"
"rCode:" "plsl",
"name:" "PLSL PA",
"description:" "",
"sValue:" "plsl.png"

For example, I want change "id": to "rTypeID", "desc" to "Description":, "icon": to "sValue:".

I heard that easily do it using the library GSON. Thanks for help.

Bertrand Martel
  • 42,756
  • 16
  • 135
  • 159
Kima321
  • 55
  • 1
  • 1
  • 8

0 Answers0