) if there was error
## or result with the data returned as a result
# "The response contains a JSON object, which always has a Boolean field ‘ok’ and may have an optional String field ‘descri
8
=item * I<verbose>
=item * I<debug>
=back
=item B<data>( String )
Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPasspor
ble). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of cu
ble). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of cu
ble). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of cu
ble). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of cu
2json( $resp->decoded_content ) ||
return( $self->error( "Unable to parse the json data received from server: ", $self->error ) );
}
$self->{ 'resp' } = $resp;
return( $self );
}
sub data2json
provided to decode into json." ) ) if( !length( $data ) );
if( $unescape )
{
$data =~ s/\\\\r\\\\n/\n/gs;
$data =~ s/^\"|\"$//gs;
$data =~ s/\"\[|\]\"//gs;
}
my $json;
eval
{
local $SIG{
'__WARN__' } = sub{ };
local $SIG{ '__DIE__' } = sub{ };
$json = $self->{ 'json' }->decode( $data );
};
if( $@ )
{
my $fh = File::Temp->new( SUFFIX => '.js' );
my $file = $fh->filename;
use DateTime::TimeZone;
use File::Temp;
use File::Spec;
# For the JSON::true and JSON::false
use JSON;
use Net::API::Telegram::Number;
our( $VERSION ) = 'v0.100.2';
};
sub init
{
{
if( $self->_is_boolean( $k ) )
{
$hash->{ $k } = ( $self->{ $k } ? JSON::true : JSON::false );
}
else
{
$hash->{ $k } = $crawl->( $self->{ $k } );
chmod( 0666, $file );
return( 1 );
}
sub parent { return( shift->{_parent} ); }
sub TO_JSON
{
my $self = shift( @_ );
return( $self->can( 'as_string' ) ? $self->as_string : $self );
L;
use File::Temp;
use File::Spec;
use File::Basename ();
use IO::File;
use Data::UUID;
use JSON;
use Encode ();
use File::Map;
use Class::Struct qw( struct );
use Devel::StackTrace;
use Ti
= '';
$self->{ 'external_port' } = '';
$self->{ 'external_path' } = '';
$self->{ 'encode_with_json' } = 1;
$self->{ 'cookie_file' } = '';
$self->{ 'browser' } = $BROWSER;
$self->{ 'timeout' } =
r} = File::Spec->tmpdir;
## Json configuration file
$self->{conf_file} = '';
$self->SUPER::init( @_ );
$self->{conf_data} = {};
if( $self->{conf_file} )
{
my $json = $self->conf_file( $self->{