morrySnow commented on code in PR #39932:
URL: https://github.com/apache/doris/pull/39932#discussion_r1734152788


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/JsonLiteral.java:
##########
@@ -32,6 +34,13 @@ public class JsonLiteral extends Literal {
 
     private static final ObjectMapper MAPPER = new ObjectMapper();
 
+    static {
+        // 启用严格的 JSON 验证配置

Review Comment:
   use english



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/JsonLiteral.java:
##########
@@ -32,6 +34,13 @@ public class JsonLiteral extends Literal {
 
     private static final ObjectMapper MAPPER = new ObjectMapper();
 
+    static {
+        // 启用严格的 JSON 验证配置
+        MAPPER.enable(DeserializationFeature.FAIL_ON_TRAILING_TOKENS);
+        MAPPER.enable(JsonParser.Feature.STRICT_DUPLICATE_DETECTION);

Review Comment:
   this should be remove since be accept duplicate key in json



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/JsonLiteral.java:
##########
@@ -32,6 +34,13 @@ public class JsonLiteral extends Literal {
 
     private static final ObjectMapper MAPPER = new ObjectMapper();
 
+    static {
+        // 启用严格的 JSON 验证配置
+        MAPPER.enable(DeserializationFeature.FAIL_ON_TRAILING_TOKENS);
+        MAPPER.enable(JsonParser.Feature.STRICT_DUPLICATE_DETECTION);
+        MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

Review Comment:
   this should be removed because it is used for java object deserialization



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to