… | |
… | |
69 | =item json-utf-16le, json-utf-16be - little endian/big endian utf-16 |
69 | =item json-utf-16le, json-utf-16be - little endian/big endian utf-16 |
70 | |
70 | |
71 | =item json-utf-32le, json-utf-32be - little endian/big endian utf-32 |
71 | =item json-utf-32le, json-utf-32be - little endian/big endian utf-32 |
72 | |
72 | |
73 | =item cbor - CBOR (RFC 7049, L<CBOR::XS>), a kind of binary JSON |
73 | =item cbor - CBOR (RFC 7049, L<CBOR::XS>), a kind of binary JSON |
|
|
74 | |
|
|
75 | =item cbor-packed - CBOR using extensions to make it smaller |
74 | |
76 | |
75 | =item storable - a L<Storable> frozen value in network format |
77 | =item storable - a L<Storable> frozen value in network format |
76 | |
78 | |
77 | =item storable-file - a L<Storable> file in network format (Storable has two incompatible formats) |
79 | =item storable-file - a L<Storable> file in network format (Storable has two incompatible formats) |
78 | |
80 | |
… | |
… | |
195 | "json-utf-16le" => sub { encode "utf-16le", JSON::XS->new->encode ($_) }, |
197 | "json-utf-16le" => sub { encode "utf-16le", JSON::XS->new->encode ($_) }, |
196 | "json-utf-16be" => sub { encode "utf-16be", JSON::XS->new->encode ($_) }, |
198 | "json-utf-16be" => sub { encode "utf-16be", JSON::XS->new->encode ($_) }, |
197 | "json-utf-32le" => sub { encode "utf-32le", JSON::XS->new->encode ($_) }, |
199 | "json-utf-32le" => sub { encode "utf-32le", JSON::XS->new->encode ($_) }, |
198 | "json-utf-32be" => sub { encode "utf-32be", JSON::XS->new->encode ($_) }, |
200 | "json-utf-32be" => sub { encode "utf-32be", JSON::XS->new->encode ($_) }, |
199 | "cbor" => sub { require CBOR::XS; CBOR::XS::encode_cbor ($_) }, |
201 | "cbor" => sub { require CBOR::XS; CBOR::XS::encode_cbor ($_) }, |
|
|
202 | "cbor-packed" => sub { require CBOR::XS; CBOR::XS->new->pack_strings->encode ($_) }, |
200 | "storable" => sub { Storable::nfreeze $_ }, |
203 | "storable" => sub { Storable::nfreeze $_ }, |
201 | "storable-file" => sub { open my $fh, ">", \my $buf; Storable::nstore_fd $_, $fh; $buf }, |
204 | "storable-file" => sub { open my $fh, ">", \my $buf; Storable::nstore_fd $_, $fh; $buf }, |
202 | "bencode" => sub { require Convert::Bencode; Convert::Bencode::bencode ($_) }, |
205 | "bencode" => sub { require Convert::Bencode; Convert::Bencode::bencode ($_) }, |
203 | "clzf" => sub { require Compress::LZF; Compress::LZF::sfreeze_cr ($_) }, |
206 | "clzf" => sub { require Compress::LZF; Compress::LZF::sfreeze_cr ($_) }, |
204 | "yaml" => sub { require YAML; YAML::Dump ($_) }, |
207 | "yaml" => sub { require YAML; YAML::Dump ($_) }, |