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

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

There is a newer version: 0.9.8
Show 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 com.riversoft.weixin.common.user.Gender;

import java.io.IOException;

/**
 * Created by exizhai on 10/4/2015.
 */
public class GenderDeserializer extends JsonDeserializer {

    @Override
    public Gender deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
        return Gender.fromCode(Integer.valueOf(jsonParser.getValueAsString()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy