You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do a diff on two objects both containing the same key pointing to an array, and the new value contains only one value then the resulting change is that single value as opposed to an array containing that value.
json4s version
4.1.0-M3
4.0.6
scala version
2.13.8
jdk version
Open JDK 11
When I do a diff on two objects both containing the same key pointing to an array, and the new value contains only one value then the resulting change is that single value as opposed to an array containing that value.
The following test demonstrates the problem:
The final value, rather than being [10] is just 10.
The problem appears to be on line 102 of Diff.scala (4.1.0-M3):
Where c1 is any value and c2 is nothing, the result is c1 when it should be a JArray of c1.
Possibly, a combiner method is needed that combines JValue with a JArray as normal, but a JValue with a JNothing as a new JArray.
The text was updated successfully, but these errors were encountered: