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

com.github.lusoalex.Chainr Maven / Gradle / Ivy

Go to download

This is a json to json transformation tool for vert.x. It use original com.bazaarvoice.jolt:jolt as a proxy.

There is a newer version: 0.2
Show newest version
package com.github.lusoalex;

import java.util.Map;

import io.vertx.core.json.JsonObject;

/**
 * Created by Alexandre on 30/11/2016.
 */
public class Chainr {

    final private com.bazaarvoice.jolt.Chainr proxyChainr;

    public Chainr(com.bazaarvoice.jolt.Chainr chainr) {
        this.proxyChainr = chainr;
    }

    public JsonObject transform(JsonObject input) {
        Map transformed = (Map) proxyChainr.transform(input.getMap());
        return new JsonObject(transformed);
    }

    public JsonObject transform(int to, JsonObject input) {
        Map transformed = (Map) proxyChainr.transform(to, input.getMap());
        return new JsonObject(transformed);
    }

    public JsonObject transform(int from, int to, JsonObject input) {
        Map transformed = (Map) proxyChainr.transform(from, to, input.getMap());
        return new JsonObject(transformed);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy