com.github.lusoalex.Chainr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vertx-jolt Show documentation
Show all versions of vertx-jolt Show documentation
This is a json to json transformation tool for vert.x. It use original com.bazaarvoice.jolt:jolt as a proxy.
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);
}
}