aQute.lib.json.ArrayHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of osgi.enroute.easse.simple.adapter Show documentation
Show all versions of osgi.enroute.easse.simple.adapter Show documentation
Provides a mapping from Event Admin events to Javascript Server Side Events (SSE). This bundle registers under /sse/1, the remaining path is treated as the topic. It will then send all matching events to the browser through SSE. The type of the event is org.osgi.service.eventadmin;topic=%s, the data payload is a JSON representation of the event properties.
The newest version!
package aQute.lib.json;
import java.io.IOException;
import java.lang.reflect.Array;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Map;
import aQute.lib.hex.Hex;
public class ArrayHandler extends Handler {
Type componentType;
ArrayHandler(@SuppressWarnings("unused") Class> rawClass, Type componentType) {
this.componentType = componentType;
}
@Override
public void encode(Encoder app, Object object, Map