📜  json 到 java 对象 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:48.734000             🧑  作者: Mango

代码示例5
import com.fasterxml.jackson.databind.ObjectMapper; 
import com.fasterxml.jackson.databind.ObjectWriter; 

ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter();
String json = ow.writeValueAsString(object);