File Coverage

blib/lib/Net/WAMP/Serialization/json.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Net::WAMP::Serialization::json;
2              
3 1     1   993 use JSON ();
  1         4845  
  1         54  
4              
5             use constant {
6 1         90 serialization => 'json',
7             websocket_data_type => 'text',
8 1     1   7 };
  1         1  
9              
10             #The following have trouble dealing with anything that isn’t UTF-8;
11             #but JSON must always be UTF-8, UTF-16, or UTF-32 anyway as per RFC 7159.
12             #So, any application that wants to send binary data via JSON needs to use
13             #Base64, hex, or some such.
14             *stringify = *JSON::encode_json;
15             *parse = *JSON::decode_json;
16              
17             1;