ERS{$_[1]} }
eval {
require JSON;
JSON->import(2.00);
register_read_type(json => \&JSON::decode_json);
register_write_type(json => \&JSON::encode_json);
};
1;
__END__
=head1 NAME
Z
;
$sock->send($msg);
}
# json (if JSON.pm is available)
$sock->send_as( json => { foo => "bar" } );
my $thing = $sock->recv_as( "json" );
# custom serialization
ZeroM
ample, for JSON we do
the following (this is already done for you in ZeroMQ.pm if you have
JSON.pm installed):
use JSON ();
ZeroMQ::register_write_type('json' => \&JSON::encode_json);
Zer