use of com.infiniteautomation.mango.rest.v2.model.pointValue.PointValueTimeJsonWriter in project ma-modules-public by infiniteautomation.
the class PointValueTimeStreamJsonSerializer method serialize.
/* (non-Javadoc)
* @see com.fasterxml.jackson.databind.JsonSerializer#serialize(java.lang.Object, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider)
*/
@Override
public void serialize(PointValueTimeStream<T, INFO> value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
PointValueTimeWriter writer = new PointValueTimeJsonWriter(value.getQueryInfo(), jgen);
value.setContentType(StreamContentType.JSON);
value.start(writer);
value.streamData(writer);
value.finish(writer);
jgen.flush();
}
Aggregations