Group
Extension

Matches 5

Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/foo.pl ( view source; MetaCPAN )
use strict;
use warnings;
use JSON;
use Text::TNetstrings qw(:all);
use Benchmark qw(cmpthese);
my $structure = {
	'resources' => {
		'license' => [
			'http://opensource.org/licenses/mit-license.php'
y $tn = encode_tnetstrings($structure);
my $json = encode_json($structure);
print "TNetstrings (" . length($tn) . ")
$tn

JSON (" . length($json) . ")
$json
";

cmpthese(-10, {
	'TNetstrings' => sub{d
ecode_tnetstrings(encode_tnetstrings($structure))},
	'JSON' => sub{decode_json(encode_json($structure))},
});

Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/lib/Text/TNetstrings.pm ( view source; MetaCPAN )
ification, a simple data
interchange format better suited to low-level network communication than
JSON. See http://tnetstrings.org/ for more details.

	use Text::TNetstrings qw(:all);

	my $data = enc
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/benchmark/encode.pl ( view source; MetaCPAN )
e JSON::PP;
	$benchmarks{'JSON::PP'} = sub{JSON::PP::encode_json($structure)};
} or warn "Unable to require JSON::PP";

eval {
	require JSON::XS;
	$benchmarks{'JSON::XS'} = sub{JSON::XS::encode_json($
structure)};
} or warn "Unable to require JSON::XS";

eval {
	require Convert::Bencode;
	$benchmarks{'Convert::Bencode'} = sub{Convert::Bencode::bencode($structure)};
} or warn "Unable to require Conv
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/benchmark/decode_type.pl ( view source; MetaCPAN )
{
#	require JSON::PP;
#	$benchmarks{'JSON::PP int'} = sub{JSON::PP::encode_json("9627")};
#} or warn "Unable to require JSON::PP";

eval {
	require JSON::XS;
	JSON::XS->import('encode_json');
	my $arr
y = encode_json(["hello", 9627]);
	my $bool = "[true]";
	my $float = encode_json([3.14]);
	my $hash = encode_json({"hello" => 9627});
	my $int = encode_json([9627]);
	my $null = encode_json([undef]);
ode_json(["hello"]);
	$benchmarks{'JSON::XS int'} = sub {JSON::XS::decode_json($int)};
	$benchmarks{'JSON::XS bool'} = sub {JSON::XS::decode_json($bool)};
	$benchmarks{'JSON::XS float'} = sub {JSON::X
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/benchmark/decode.pl ( view source; MetaCPAN )
equire JSON::PP;
	my $encoded = JSON::PP::encode_json($structure);
	$benchmarks{'JSON::PP'} = sub{JSON::PP::decode_json($encoded)};
} or warn "Unable to require JSON::PP";

eval {
	require JSON::XS;
	
my $encoded = JSON::XS::encode_json($structure);
	$benchmarks{'JSON::XS'} = sub{JSON::XS::decode_json($encoded)};
} or warn "Unable to require JSON::XS";

eval {
	require Convert::Bencode;
	my $encode

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