json-flattener
json-flattener copied to clipboard
Bug in flattening byte arrays fields from Jackson objects
Byte array fields of Jackson objects are not serialized. If you have the following
JsonNode jsonNode = new ObjectMapper().valueToTree(jo);
JacksonJsonValue jsonValue = new JacksonJsonValue(jsonNode);
String json = JsonFlattener.flatten(jsonValue)
where jo is a POJO that has a non-null byte[] field, then that field is not serialized and we get a null.
There is a PR to fix this in json-base: https://github.com/wnameless/json-base/pull/9
Thanks for the contribution! I’ve just released json-flattener:v0.17.3, upgrading to json-base:v2.5.1 with the fix you provided.
Awesome, thanks!