I have a json string that has multiple sub objects, While converting this string using
JSONObject jsonObject=(JSONObject) JSONValue.parse(jsonString);
the insertion order is missed out in jsonObject especially dataCollection object. Is there a way or any library to preserve elements order during the conversion?
Sample Json:
{
"Id": "f4a305705b064074a0ed15531031f3d0",
"FirstName": "Name",
"description": "Description",
"data": {
"dataCollection": {
"Location": 883000,
"Type": "Vehicle",
"isRegistered": true,
"wheels": 4,
"isPowerSteered": "yes"
},
"Region": "India"
}
}