« blib/lib/PLS/Server/Request/Progress.pm
↑ Summary
blib/lib/PLS/Server/Request/Window/WorkDoneProgress/Create.pm »
| 1 | package PLS::Server::Message; | ||
| 2 | |||
| 3 | 13 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 13 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 13 | ▶ | use PLS::JSON; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | PLS::Server::Message | ||
| 11 | |||
| 12 | =head1 DESCRIPTION | ||
| 13 | |||
| 14 | This class is the abstract base class for all messages sent between | ||
| 15 | server and client. | ||
| 16 | |||
| 17 | See L<PLS::Server::Request> and L<PLS::Server::Response>, which | ||
| 18 | inherit from this class. | ||
| 19 | |||
| 20 | =cut | ||
| 21 | |||
| 22 | sub serialize | ||
| 23 | 38 | ▶ | { |
|
Subroutine
serialize: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 24 | 38 | my ($self) = @_; | |
| 25 | |||
| 26 | my %content = ( | ||
| 27 | jsonrpc => '2.0', | ||
| 28 | 38 | %{$self} | |
| 29 | ); | ||
| 30 | |||
| 31 | 38 | my $json = encode_json \%content; | |
| 32 | 38 | return \$json; | |
| 33 | } ## end sub serialize | ||
| 34 | |||
| 35 | 13 | 1; | |