kbendick commented on a change in pull request #4097:
URL: https://github.com/apache/iceberg/pull/4097#discussion_r810328958



##########
File path: core/src/main/java/org/apache/iceberg/util/JsonUtil.java
##########
@@ -49,6 +52,17 @@ public static ObjectMapper mapper() {
     return MAPPER;
   }
 
+  public static ObjectMapper withRESTComponents() {
+    RESTSerializers.registerAll(MAPPER);
+    // These are a workaround for Jackson since Iceberg doesn't use the 
standard get/set bean notation.
+    // This allows Jackson to work with the fields directly (both public and 
private) and not require
+    // custom (de)serializers for all the request/response objects.
+    MAPPER.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
+    MAPPER.setVisibility(PropertyAccessor.CREATOR, 
JsonAutoDetect.Visibility.ANY);  // deserialization
+    MAPPER.setVisibility(PropertyAccessor.FIELD, 
JsonAutoDetect.Visibility.ANY);  // serialization
+    return MAPPER;
+  }
+

Review comment:
       Dealt with this in the other PR. Will be removing this from this PR 
entirely.




-- 
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