use of org.talend.sdk.component.runtime.manager.ComponentManager in project component-runtime by Talend.
the class LoopState method toJsonObject.
private JsonObject toJsonObject(final Object value) {
if (jsonb == null) {
synchronized (this) {
if (jsonb == null) {
final ComponentManager manager = ComponentManager.instance();
jsonb = manager.getJsonbProvider().create().withProvider(manager.getJsonpProvider()).withConfig(new JsonbConfig().setProperty("johnzon.cdi.activated", false)).build();
}
}
}
return jsonb.fromJson(jsonb.toJson(value), JsonObject.class);
}
Aggregations