I'm working with the new Java client, v8.3.3. I'm trying to do the following:
take a source from a GetResponse<JsonData>
create a Jakarta JsonObjectBuilder from that JsonData source
use an ObjectMapper to convert that JsonObject into a Java object (Foo)
My problem is that when converting from JsonObject to Foo, string fields that are null on the source (JsonValue.ValueType.NULL) are being set to String "null" on the Java object, when they ought to be just set to null.
Has anyone else encountered anything similar, or know of a way to handle this?
Can you provide a code snippets so that we have more details to reproduce the issue?
Also, you don't need to go from JsonData to JsonObject and finally Foo: you can directly call someJsonData.to(Foo.class), which will use the object mapper associated to the Elasticsearch client.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.