com.mnubo.java.sdk.client.mapper.StringExistsResultDeserializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-client Show documentation
Show all versions of java-sdk-client Show documentation
Contains mnubo SmartObjects Java client.
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