-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Labels
pr-welcomeIssue for which progress most likely if someone submits a Pull RequestIssue for which progress most likely if someone submits a Pull Request
Milestone
Description
Search before asking
- I searched in the issues and found nothing similar.
Describe the bug
float[] and double[] are serialized to JSON as { }.
Version Information
jackson-jr-objects 2.18.3
Reproduction
The following code:
var values = new LinkedHashMap<String, Object>();
values.put("intArray", new int[] { 1, 2, 3 });
values.put("longArray", new long[] { 1L, 2L, 3L });
values.put("floatArray", new float[] { 1.0f, 2.0f, 3.0f });
values.put("doubleArray", new double[] { 1.0, 2.0, 3.0 });
System.out.println(JSON.std.with(JSON.Feature.PRETTY_PRINT_OUTPUT).asString(values));prints:
{
"intArray" : [ 1, 2, 3 ],
"longArray" : [ 1, 2, 3 ],
"floatArray" : { },
"doubleArray" : { }
}
Expected behavior
{
"intArray" : [ 1, 2, 3 ],
"longArray" : [ 1, 2, 3 ],
"floatArray" : [ 1.0, 2.0, 3.0 ],
"doubleArray" : [ 1.0, 2.0, 3.0 ]
}
Metadata
Metadata
Assignees
Labels
pr-welcomeIssue for which progress most likely if someone submits a Pull RequestIssue for which progress most likely if someone submits a Pull Request