code: public static JsonObject csvToJsonObject(List<String> bulkRecordHeader, List<String> record, int columnCount) {
      ObjectMapper mapper = new ObjectMapper();
      Map<String, String> resultInfo = new HashMap<>();
      for (int i = 0; i < columnCount; i++) {
        resultInfo.put(bulkRecordHeader.get(i), record.get(i));
      }
  
      JsonNode json = mapper.valueToTree(resultInfo);
      JsonElement element = GSON.fromJson(json.toString(), JsonObject.class);
      return element.getAsJsonObject();
    }
docs: Convert CSV record(List<Strings>) to JsonObject using header(column Names)
  @param header record
  @param data record
  @param column Count
  @return JsonObject