}
}
private static JsonArray encodeObjectMap(Type keyType, Type valueType,
Map<?, ?> map, ConnectorTracker connectorTracker) {
JsonArray keys = Json.createArray();
JsonArray values = Json.createArray();
for (Entry<?, ?> entry : map.entrySet()) {
EncodeResult encodedKey = encode(entry.getKey(), null, keyType,
connectorTracker);
EncodeResult encodedValue = encode(entry.getValue(), null,
valueType, connectorTracker);
keys.set(keys.length(), encodedKey.getEncodedValue());
values.set(values.length(), encodedValue.getEncodedValue());
}
JsonArray jsonMap = Json.createArray();
jsonMap.set(0, keys);
jsonMap.set(1, values);
return jsonMap;
}