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

io.robe.convert.xml.parsers.ParseEnum Maven / Gradle / Ivy

There is a newer version: 0.5.0.0-1039
Show newest version
package io.robe.convert.xml.parsers;

import com.fasterxml.jackson.core.JsonParser;

import java.io.IOException;
import java.lang.reflect.Field;

import static java.lang.Enum.valueOf;

public class ParseEnum implements IsParser {
    @Override
    public Object parse(JsonParser parser, Field field) throws IOException {
        Class enumClass = (Class) field.getType();
        return valueOf(enumClass, parser.getValueAsString());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy