eolivelli opened a new issue #8882:
URL: https://github.com/apache/pulsar/issues/8882


   **Describe the bug**
   It looks like GenericJsonReader is not handling correctly `null` values
   
   This is a reproducer:
   
   ```
    byte[] json = "{\"somefield\":null}".getBytes();
       GenericJsonRecord record =
               new GenericJsonReader(Collections.singletonList(new 
Field("somefield", 0)))
                       .read(json, 0, json.length);
       assert record.getJsonNode().get("somefield").isNull();
       assert "null".equals(record.getField("somefield"));
       assert record.getField("somefield") != null;
   ```
   **Expected behavior**
   The null value is not converted to a string, but it is still a null value
   
   **Additional context**
   The problem affects Pulsar Functions/Pulsar IO


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


Reply via email to