use of com.ibm.json.java.JSONObject in project streamsx.topology by IBMStreams.
the class BOperator method complete.
@Override
public JSONObject complete() {
JSONObject json = super.complete();
if (regions != null) {
JSONArray ra = new JSONArray();
ra.addAll(regions);
json.put("regions", ra);
}
return json;
}
use of com.ibm.json.java.JSONObject in project streamsx.topology by IBMStreams.
the class BOutputPort method complete.
@Override
public JSONObject complete() {
final JSONObject json = json();
BUtils.addPortInfo(json, port);
JSONArray conns = new JSONArray();
for (StreamConnection c : port().getConnections()) {
conns.add(c.getInput().getName());
}
json.put("connections", conns);
return json;
}
use of com.ibm.json.java.JSONObject in project streamsx.topology by IBMStreams.
the class BOperatorInvocation method complete.
@Override
public JSONObject complete() {
final JSONObject json = super.complete();
if (outputs != null) {
JSONArray oa = new JSONArray(outputs.size());
for (BOutputPort output : outputs) {
oa.add(output.complete());
}
json.put("outputs", oa);
}
if (inputs != null) {
JSONArray ia = new JSONArray(inputs.size());
for (BInputPort input : inputs) {
ia.add(input.complete());
}
json.put("inputs", ia);
}
return json;
}
use of com.ibm.json.java.JSONObject in project streamsx.topology by IBMStreams.
the class SPLValue method getMetaType.
private static MetaType getMetaType(JSONObject jo) {
JSONObject value = (JSONObject) jo.get("value");
String metaType = (String) value.get("metaType");
return MetaType.valueOf(metaType);
}
use of com.ibm.json.java.JSONObject in project streamsx.topology by IBMStreams.
the class SPLValue method getWrappedValue.
private static Object getWrappedValue(JSONObject jo) {
JSONObject value = (JSONObject) jo.get("value");
Object wrappedValue = value.get("value");
return wrappedValue;
}
Aggregations