I am getting the below records from a backend system and not sure how many such records I might be receiving. As you can see the data I receive is not in a valid json format.
[489078:{cancelled:1, totalQty:2, AcceptedQty:1},
489079:{cancelled:0, totalQty:1, AcceptedQty:1},
.
.]
I want to convert the above payload into a valid a JsonArray of JsonObjects for further processing by converting it into a String first. I've tried replace String function, but it always fails at some point. Is there any other approach supported by java for performing this function?