1,
coerce => sub {
my $serializer = shift or return undef;
require JSON::MaybeXS;
JSON::MaybeXS->new( ref $serializer ? %$serializer : () );
},
);
has login => (
i
sumed to be JSON
objects and will be automatically encoded/decoded using a L<JSON::MaybeXS>
serializer. If the value of C<serializer> is a hash, it'll be passed as
arguments to the L<JSON::MaybeXS> c
structures to JSON on the client side, you can do something like
var mySocket = new WebSocket(urlMySocket);
mySocket.sendJSON = function(message) {
return this.send(JSON.stringify(mes