All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.riversoft.weixin.common.util.BooleanDeserializer Maven / Gradle / Ivy

The newest version!
package com.riversoft.weixin.common.util;

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

import java.io.IOException;

/**
 * Created by exizhai on 9/26/2015.
 */
public class BooleanDeserializer extends JsonDeserializer {

    @Override
    public Boolean deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
        return jsonParser.getIntValue() > 0;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy