private List<Message> formatJson(JsonObject jsonObject) {
    TreeMessage message = new TreeMessage();
    message.setDevice(jsonObject.get(JSON_KEY_DEVICE).getAsString());
    message.setTimestamp(jsonObject.get(JSON_KEY_TIMESTAMP).getAsLong());
    message.setMeasurements(
        GSON.fromJson(
            jsonObject.get(JSON_KEY_MEASUREMENTS), new TypeToken<List<String>>() {}.getType()));
    message.setValues(
        GSON.fromJson(jsonObject.get(JSON_KEY_VALUES), new TypeToken<List<String>>() {}.getType()));
    if (jsonObject.has(JSON_KEY_DATATYPE)) {
      message.setDataTypes(
          GSON.fromJson(
              jsonObject.get(JSON_KEY_DATATYPE), new TypeToken<List<TSDataType>>() {}.getType()));
    }
    return Lists.newArrayList(message);
  }
The JSON payload formatter. two json format supported: { "device":"root.sg.d1",
"timestamp":1586076045524, "measurements":["s1","s2"], "values":[0.530635,0.530635] }

<p>{ "device":"root.sg.d1", "timestamps":[1586076045524,1586076065526],
"measurements":["s1","s2"], "values":[[0.530635,0.530635], [0.530655,0.530695]] }
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/mqtt/JSONPayloadFormatter.java