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

com.mnubo.java.sdk.client.mapper.StringExistsResultDeserializer Maven / Gradle / Ivy

There is a newer version: 1.14.4
Show newest version
package com.mnubo.java.sdk.client.mapper;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.TreeNode;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.node.BooleanNode;

import java.io.IOException;
import java.util.LinkedHashMap;

public class StringExistsResultDeserializer extends StdDeserializer> {
    public static final Class> targetClass = (Class>)new LinkedHashMap().getClass();

    public StringExistsResultDeserializer() {
        super(LinkedHashMap.class);
    }

    @Override
    public LinkedHashMap deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
        final LinkedHashMap resVal = new LinkedHashMap<>();
        final TreeNode array = p.getCodec().readTree(p);

        for(int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy