private List<Message> formatBatchJson(JsonObject jsonObject) {
    String device = jsonObject.get(JSON_KEY_DEVICE).getAsString();
    List<String> measurements =
        GSON.fromJson(
            jsonObject.getAsJsonArray(JSON_KEY_MEASUREMENTS),
            new TypeToken<List<String>>() {}.getType());
    List<Long> timestamps =
        GSON.fromJson(
            jsonObject.get(JSON_KEY_TIMESTAMPS), new TypeToken<List<Long>>() {}.getType());
    List<List<String>> values =
        GSON.fromJson(
            jsonObject.get(JSON_KEY_VALUES), new TypeToken<List<List<String>>>() {}.getType());
    List<TSDataType> types =
        jsonObject.has(JSON_KEY_DATATYPE)
            ? GSON.fromJson(
                jsonObject.get(JSON_KEY_DATATYPE), new TypeToken<List<TSDataType>>() {}.getType())
            : null;

    List<Message> ret = new ArrayList<>(timestamps.size());
    for (int i = 0; i < timestamps.size(); i++) {
      TreeMessage message = new TreeMessage();
      message.setDevice(device);
      message.setTimestamp(timestamps.get(i));
      message.setMeasurements(measurements);
      message.setValues(values.get(i));
      message.setDataTypes(types);
      ret.add(message);
    }
    return ret;
  }
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