This seems quite simple but i'm struggling to transform this:
{
"myList": [{
"id": 1,
"type": "EnergyBox",
"properties": ["Name : Eb1", "Prop2 : Val1", "PropN : ValN"]
}, {
"id": 2,
"type": "EnergyBox",
"properties": ["Name : Eb2", "Prop2 : Val2", "Prop3 : Val3"]
}]
}
into this:
{
"myList": [{
"id": 1,
"type": "EnergyBox",
"properties": {
"Name": "Eb1",
"Prop2": "Val1",
"PropN": "ValN"
}
}, {
"id": 2,
"type": "EnergyBox",
"properties": {
"Name": "Eb2",
"Prop2": "Val2",
"Prop3": "Val3"
}
}]
}
I'm using Java 8, Jackson and Simplejson to parse the data, but somehow, and after many hours of trying, still not working.
["Name : Eb1", "Prop2 : Val1", "PropN : ValN"]to{"Name": "Eb1","Prop2": "Val1","PropN": "ValN"}. All the other stuff is just clutter.