As noted in bug 20797 there appears to be a bug in Koha::Object::TO_JSON. Specifically:
elsif ( _numeric_column_type( $columns_info->{$col}->{data_type} ) ) {
# TODO: Remove once the solution for
# https://rt.cpan.org/Ticket/Display.html?id=119904
# is ported to whatever distro we support by that time
$unblessed->{$col} += 0;
}
Here we are explicitly casting to an integer to workaround an upstream bug. This works fine unless the data in question comes from a numeric type column but is NULL, in which case it is cast to 0.
I suspect the desired behaviour here is for it to remain unaltered unless the value is also numeric.