// // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package com.sprucetec.datacenter.util; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; public class JsonMapperUtil { private static ObjectMapper objectMapper; public JsonMapperUtil() { } public static ObjectMapper getJsonMapper() { if(objectMapper == null) { Class var0 = JsonMapperUtil.class; synchronized(JsonMapperUtil.class) { if(objectMapper == null) { objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); } } } return objectMapper; } }
JsonMapperUtil
JSON映射工具实现
最新推荐文章于 2024-08-31 07:29:29 发布
本文介绍了一个用于处理JSON数据的Java工具类JsonMapperUtil的实现细节。该工具类使用了Jackson库来配置一个可重用的对象映射器,允许在Java对象与JSON格式的数据间进行灵活转换,同时针对未知属性进行了特殊配置以增强程序的健壮性。
8050

被折叠的 条评论
为什么被折叠?



