Group
Extension

Matches 1

ZMQ ( D/DM/DMAKI/ZMQ-1.06.tar.gz, DMAKI, 2014; MetaCPAN )
ZMQ/lib/ZMQ/Serializer.pm ( view source; MetaCPAN )
use JSON ();

    ZMQ::register_read_type(json => \&JSON::decode_json);
    ZMQ::register_write_type(json => \&JSON::encode_json);

    my $sock = $ctx->socket( ... );

    $sock->sendmsg_as( json => 
$payload );
    my $payload = $sock->recvmsg_as( 'json' );

=head1 DESCRIPTION

You can add a simple serialization/deserialization mechanism to ZMQ by enabling this module.

To enable serialization, y
le, for JSON we do
the following (this is already done for you in ZMQ.pm if you have
JSON.pm installed):

    use JSON ();
    ZMQ::Serializer::register_write_type('json' => \&JSON::encode_json);
    

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.