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

io.hyperfoil.tools.horreum.svc.ProxyJackson Maven / Gradle / Ivy

There is a newer version: 0.15.3
Show newest version
package io.hyperfoil.tools.horreum.svc;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;

public class ProxyJackson {

    public static Object wrap(JsonNode object) {
        if (object == null) {
            return null;
        } else if (object.isObject()) {
            return new ProxyJacksonObject((ObjectNode) object);
        } else if (object.isArray()) {
            return new ProxyJacksonArray((ArrayNode) object);
        } else {
            return object;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy