You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/18 01:26:55 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #9608: Fix writing/encoding of GenericJsonRecord

sijie commented on a change in pull request #9608:
URL: https://github.com/apache/pulsar/pull/9608#discussion_r578060880



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonWriter.java
##########
@@ -36,7 +38,11 @@ public GenericJsonWriter() {
     @Override
     public byte[] write(GenericRecord message) {
         try {
-            return objectMapper.writeValueAsBytes(((GenericJsonRecord)message).getJsonNode().toString());
+            ByteArrayOutputStream buffer = new ByteArrayOutputStream();

Review comment:
       +1 to what @MarvinCai said




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

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