Jackson自定义反序列化

import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonNode;


public class ProductResultDeserializer  extends JsonDeserializer {

	@Override
	public JointOperationProductResult deserialize(JsonParser jp, DeserializationContext ctxt)
			throws IOException, JsonProcessingException {
		 	JsonNode node = jp.getCodec().readTree(jp);  
		 	String code = node.get("code").asText();
		 	Integer total = node.get("total").asInt();
		 	JsonNode  listNode =node.path(

你可能感兴趣的:(JAVA,jackson,java,反序列化)