Click here to Skip to main content
15,903,030 members

Comments by Prashanthi Kakarla (Top 1 by date)

Prashanthi Kakarla 13-Feb-20 11:03am View    
My requirement is to store the message(doesn't matter chinese or any other characters) to a file
<prev>
String test = "hello.."+"测试,收到不用理会";
com.fasterxml.jackson.databind.ObjectMapper mapper = new com.fasterxml.jackson.databind.ObjectMapper();
mapper.writeValue(new File("C:\\testpayload\\transformed.json"), test);

Is it possible to set encoding to com.fasterxml.jackson.databind.ObjectMapper.writeValue()?