You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "TyrantLucifer (via GitHub)" <gi...@apache.org> on 2023/04/08 15:57:09 UTC

[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #4111: [Feature][Json-format] support read format for pulsar

TyrantLucifer commented on code in PR #4111:
URL: https://github.com/apache/incubator-seatunnel/pull/4111#discussion_r1161127268


##########
seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/JsonDeserializationSchema.java:
##########
@@ -59,6 +61,7 @@ public class JsonDeserializationSchema implements DeserializationSchema<SeaTunne
     /** Object mapper for parsing the JSON. */
     private final ObjectMapper objectMapper = new ObjectMapper();
 
+    @Builder

Review Comment:
   Why add this?



##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/utils/JsonUtils.java:
##########
@@ -244,6 +244,15 @@ public static ObjectNode parseObject(String text) {
         }
     }
 
+    public static ObjectNode parseObject(byte[] content) {

Review Comment:
   return parseObject(String.valueOf(content)), or change parseObject(String json) to return parseObject(json.getBytes());



##########
seatunnel-formats/seatunnel-format-text/src/main/java/org/apache/seatunnel/format/text/TextFormatFactory.java:
##########
@@ -0,0 +1,77 @@
+/*

Review Comment:
   The correct approach is to put all changes related to this PR together and merge them into a single commit. Any changes unrelated to this PR should be placed in another PR. This helps keep the purpose and scope of each PR clear, and facilitates code review and management. If there are changes unrelated to this PR, they can be mentioned in the commit message and placed in another PR.



##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/OptionUtil.java:
##########
@@ -103,4 +106,19 @@ private static String formatUnderScoreCase(String camel) {
         }
         return underScore.toString();
     }
+
+    public static <T> T get(

Review Comment:
   Why add this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org