I have converted the hashmap to byte [] by using object mapper. Like below
private static final ObjectMapper objectMapper = new ObjectMapper() .co