Closed Juuxel closed 4 years ago
No test case needed, noticed that problem last week, haven't got around to make my own PR. Though I wanted to add Optional<Boolean> getBooleanValue(T input);
to both DynamicOps
(default
, going through getNumberValue
) and JsonOps
.
Hm, I thought about that as well but didn't really want to make changes to DynamicOps
. I can add that to the PR.
Finally, thanks fry!
Dynamic.convert() checks the number values of the types that are converted, but JsonOps didn't provide a number value for booleans. convert() defaults to 0 (false), so Gson booleans were always false.
Edit: Here's an example of the behavior: