We are using compile net.sf.json-lib:json-lib:2.4:jdk15
String requestBody = {"resconfirmsvid":28,"reservationno":"H0028W090718","component":"Hotel","partnerid":2,"total":169002.15,"internalnote":"","currencycode":"USD","history":[{"id":"0","payment_type":"Payment","payment_method":"Cash","date":"2019-10-30","refnumber":"012525TRTY","amount":160000,"currency":"USD","component":"Hotel","resconfirmsvid":28}]}
requestBody = URLDecoder.decode(requestBody, "UTF-8");
JSONObject request = JSONObject.fromObject(requestBody);
Then request object as follows,
request = {"resconfirmsvid":28,"reservationno":"H0028W090718","component":"Hotel","partnerid":2,"total":169002.16,"internalnote":"","currencycode":"USD","history":[{"id":"0","payment_type":"Payment","payment_method":"Cash","date":"2019-10-30","refnumber":"012525TRTY","amount":160000,"currency":"USD","component":"Hotel","resconfirmsvid":28}]}
After convert json string into json object using fromObject "total" value changed to 169002.16 from 169002.15