I have a json string with possible nested object inside like this:
{
"stringTypeCode": "aaaaa",
"choiceTypeCode1": {
"option1": true,
"option2": true
},
"choiceTypeCode2": {
"option3": true,
"option4": true
}
}
I need it to convert to a Map leaving the nested objects as strings:
stringTypeCode - aaaaa
choiceTypeCode1 - {"option1": true,"option2": true}
choiceTypeCode2 - {"option2": true,"option3": true}
Can it be done in a simple way, preferably without any library?
Edit: or with a library if there is no other simple way.
Edit2: I have a variable number of properties with variable names in the objects.