@@ -0,0 +1,1309 @@
+package com.zbmatsu.iov.common.util;%0D%0A%0D%0Aimport java.text.SimpleDateFormat;%0D%0A%0D%0Aimport org.codehaus.jackson.annotate.JsonAutoDetect;%0D%0Aimport org.codehaus.jackson.annotate.JsonMethod;%0D%0Aimport org.codehaus.jackson.map.DeserializationConfig;%0D%0Aimport org.codehaus.jackson.map.ObjectMapper;%0D%0Aimport org.codehaus.jackson.map.annotate.JsonSerialize;%0D%0A%0D%0A%0D%0A%0D%0A/**%0D%0A * %E5%AF%B9ObjectMapper%E9%87%8D%E6%96%B0%E5%B0%81%E8%A3%85, %E6%96%B9%E4%BE%BF%E8%B0%83%E7%94%A8%0D%0A *%0D%0A * %E7%94%A8%E6%B3%95:%0D%0A *   1. JsonUtil.toJSONString()%0D%0A *   2. JsonUtil.toBean()%0D%0A *   3. JsonUtil.mapper.writeValueAsString()%0D%0A *   ...%0D%0A */%0D%0Apublic class JsonUtil extends ObjectMapper%7B%0D%0A%0D%0A%09public static final JsonUtil mapper = new JsonUtil();%0D%0A    static %7B%0D%0A        mapper.setDateFormat(new SimpleDateFormat(%22yyyyMMddHHmmss%22));%0D%0A        mapper.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);%0D%0A        mapper.setVisibility(JsonMethod.FIELD, JsonAutoDetect.Visibility.DEFAULT);%0D%0A        mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);%0D%0A    %7D%0D%0A%0D%0A    public JsonUtil()%7B%0D%0A        super();%0D%0A    %7D%0D%0A%0D%0A    public static String toJSONString(Object o) throws Exception%7B%0D%0A        return mapper.writeValueAsString(o);%0D%0A    %7D%0D%0A%0D%0A    @SuppressWarnings(%22unchecked%22)%0D%0A%09public static %3CT%3E T toBean(String json, Class%3C?%3E clazz) throws Exception%7B%0D%0A        return (T)mapper.readValue(json, clazz);%0D%0A    %7D%0D%0A%7D%0D%0A

add JsonUtil