Raisin
Raisin copied to clipboard
Regex check in Raisin::Entity flags numbers as strings for JSON::XS
Raisin::Entity::_compile_column contains the following check on an entity runtime return value:
$retval && !ref($retval) && $retval =~ /^Raisin::Entity::Nested::/
The checks on $retval unfortunately means that any non-zero value returned as a number from the runtime will be output as a string in JSON, due to the regex, if the user happens to be using JSON::XS.
Raisin example: https://replit.com/@m-dango/RaisinNumericString#main.pl
Comparing resulting JSON across different modules: https://replit.com/@m-dango/jsonNumberRegex#main.pl