Class JSONPayloadFormatter
- java.lang.Object
-
- org.apache.iotdb.db.protocol.mqtt.JSONPayloadFormatter
-
- All Implemented Interfaces:
PayloadFormatter
public class JSONPayloadFormatter extends java.lang.Object implements PayloadFormatter
The JSON payload formatter. two json format supported: { "device":"root.sg.d1", "timestamp":1586076045524, "measurements":["s1","s2"], "values":[0.530635,0.530635] }{ "device":"root.sg.d1", "timestamps":[1586076045524,1586076065526], "measurements":["s1","s2"], "values":[[0.530635,0.530635], [0.530655,0.530695]] }
-
-
Constructor Summary
Constructors Constructor Description JSONPayloadFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Message>format(io.netty.buffer.ByteBuf payload)format a payload to a list of messagesjava.lang.StringgetName()get the formatter name
-
-
-
Method Detail
-
format
public java.util.List<Message> format(io.netty.buffer.ByteBuf payload)
Description copied from interface:PayloadFormatterformat a payload to a list of messages- Specified by:
formatin interfacePayloadFormatter- Returns:
-
getName
public java.lang.String getName()
Description copied from interface:PayloadFormatterget the formatter name- Specified by:
getNamein interfacePayloadFormatter- Returns:
-
-