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

eu.xenit.apix.search.json.InvertSearchNodeDeserializer Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
package eu.xenit.apix.search.json;

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 eu.xenit.apix.search.nodes.InvertSearchNode;
import eu.xenit.apix.search.nodes.SearchSyntaxNode;
import java.io.IOException;

public class InvertSearchNodeDeserializer extends JsonDeserializer {

    @Override
    public InvertSearchNode deserialize(JsonParser jp, DeserializationContext ctxt)
            throws IOException, JsonProcessingException {
        SearchSyntaxNode nested = (SearchSyntaxNode) ctxt
                .findRootValueDeserializer(ctxt.constructType(SearchSyntaxNode.class)).deserialize(jp, ctxt);

        return new InvertSearchNode(nested);

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy