package Thrift::JSONProtocol;
=head1 NAME
Thrift::JSONProtocol
=head1 DESCRIPTION
JSON protocol implementation for thrift.
This is a full-featured protocol supporting write and read.
This code w
H => '\\',
ZERO => '0',
ESCSEQ => join('','\\','u','0','0'),
VERSION => 1,
JSON_CHAR_TABLE => [
# 0 1 2 3 4 5 6 7 8 9 A B C D E F
0,
lf->{context_} = Thrift::JSONProtocol::JSONBaseContext->new( protocol => $self );
# Reader that manages a 1-byte buffer
$self->{reader_} = Thrift::JSONProtocol::LookaheadReader->ne
t
use strict;
use warnings;
use base qw(Thrift::Parser::Type);
use Scalar::Util qw(blessed);
use JSON::XS;
=head1 USAGE
Stringification is overloaded to the values 'true' or 'false'.
When composin
ss, $value) = @_;
if (ref $value && blessed($value) && $value->isa('JSON::XS::Boolean')) {
$value = $value == JSON::XS::true ? 1 : 0;
}
return $class->SUPER::compose($value);
}