This repository has been archived by the owner on Jan 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Null fields are always ignored when serializing list of objects #106
Milestone
Comments
@morbrian Quick question: can you reproduce this with 2.7.0-rc2? |
@cowtowncoder Yes, I tried As I play with the code I am learning the issue may already be known about, but perhaps not easy to fix without impacting other desired behavior. Uncommenting the code block described in the issue report fixes the problem for my current use cases, but doing so breaks other related Null tests: The |
morbrian
added a commit
to morbrian/jackson-dataformat-csv
that referenced
this issue
Jan 1, 2016
…ocessing null elements of lists as empty fields or the nullCharacter during serialization instead of the default behavior which skips null elements.
morbrian
added a commit
to morbrian/jackson-dataformat-csv
that referenced
this issue
Jan 1, 2016
…ocessing null elements of lists as empty fields or the nullCharacter during serialization instead of the default behavior which skips null elements.
morbrian
added a commit
to morbrian/jackson-dataformat-csv
that referenced
this issue
Jan 1, 2016
…ocessing null elements of lists as empty fields or the nullCharacter during serialization instead of the default behavior which skips null elements.
morbrian
added a commit
to morbrian/jackson-dataformat-csv
that referenced
this issue
Jan 3, 2016
…process null values when processing nulls deeper than the root level. [FasterXML#106] added unit test code to verify writeNull behavior for list elements.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When serializing a list of objects, any null values are skipped over as if they do not exist instead of writing an empty character or using a custom value in place of null.
Example 1 (Expected Default Behavior)
Example 2 (Expected Custom Behavior)
Tested Versions
Unit Tests
To demonstrate the issue, the test methods below may be added to NullWritingTest.java
Other Background
This issue may be related to an overlooked area of CsvGenerator.java when fixing #83 or #69
In that class, there are some related notes in method
public void writeNull() throws IOException
, the second condition in the block below is matched, but the write activity is commented out:The text was updated successfully, but these errors were encountered: