Open yankj12 opened 5 years ago
参考 jackson转换java对象为json
import com.fasterxml.jackson.databind.ObjectMapper; ObjectMapper objectMapper = new ObjectMapper(); Pojo pojo = ... String json = objectMapper.writeValueAsString(pojo);
参考 jackson转换java对象为json