n Williams. 2010 Matt S Trout
=item L<version> Copyright 2004-2010 John Peacock
=item L<JSON::PP> Copyright 2007-2011 by Makamaka Hannyaharamitu
=item L<CPAN::Meta>, L<CPAN::Meta::Requi
code_json {
my($self, $data) = @_;
require JSON::PP;
my $json = JSON::PP::encode_json($data);
$self->uri_escape($json);
}
sub decode_json {
my($self, $json) = @
_;
require JSON::PP;
JSON::PP::decode_json($json);
}
sub uri_escape {
my($self, $fragment) = @_;
$fragment =~ s/([^A-Za-z0-9\-\._~])/uc sprintf("%%%02X", ord($1))/eg;