Subject: | Marshal::Text fails when parsing non-error JSON-RPC 1.0 responses |
Trying to parse a JSON-RPC 1.0 response with "error":null in it causes
Marshal::Text to traceback with this as the top error:
Attribute (message) does not pass the type constraint because: Validation
failed for 'Str' failed with value undef at
/usr/lib/perl5/vendor_perl/5.10.0/JSON/RPC/Common/Procedure/Return/Error.
pm line 44
Here's the code to reproduce:
use JSON::RPC::Common::Marshal::Text;
my $m = JSON::RPC::Common::Marshal::Text->new;
$m->json_to_return('{"error":null,"id":1,"result":1}');