Allow null values in property objects
raelg opened this issue · comments
Hi,
Currently, null values in objects are not allowed, as JsonRepresentationReader uses Guava's ImmutableMap internally, which does not permit null keys or values. While it may be dubious practice to have a null value (as returning a null value from a Java Map may mean either the key does not exist or it does exist and is null), however, this is still valid JSON, which means it probably should be handled.
The simplest solution looks to be to remove the ImmutableMap.copyOf wrapper.
example failing HAL extract:
{
....
"page": {
"offset": null,
"limit": null
},
...
}
Thanks.
This is currently now working under commit 5e2c752, with the switch away from Guava's ImmutableMaps in favour of using Javaslang persistent maps/lists thru out in the eventual 5.x release series.