After I consume the data from the SQS queue, I got a json output.But I have not saved this json output anywhere.Then I transformed the data received from SQS by jolt like this.
private Object toTransform(String message) {
Object data = null;
Object joltConverted;
String spec = `spec string`;
JoltTransformation joltTransformation;
try {
data = DATA_READER.readValue(message);
joltTransformation=new JoltTransformation(data, spec);
joltConverted=joltTransformation.joltConvert();
} catch (Exception e) {
LOGGER.error("Error decoding message", e);
throw new RuntimeException(e);
}
return joltConverted;
}
Then format of the json I received is as follows.
[ { "device_0":"04BC", "device_1":"02BA" }, { "device_2":"09AB", "device_3":"04BA" } ]
Now I wanted to convert these hexadecimal values to decimal values and update this Json object. How can I do this?