Group
Extension

Matches 35358

MetaCPAN-Clients ( S/SZ/SZABGAB/MetaCPAN-Clients-1.00.tar.gz, SZABGAB, 2020; MetaCPAN )
MetaCPAN-Clients/bin/metacpan_favorite.pl ( view source; MetaCPAN )
#!/usr/bin/env perl
use v5.14;
use strict;
use warnings;
use HTTP::Tiny;
use JSON;
use Path::Tiny;

my ($token, $list) = @ARGV;
die "Usage: $0 <token> <file>\n" if not $list;

my $ua = HTTP::Tiny->new
t = to_json( \%data );
    my $res = $ua->post(
        "https://api.metacpan.org/user/favorite?access_token=$token",
        { content => $post, headers => {'content-type' => 'application/json' }},
 
Escape-Houdini ( Y/YA/YANICK/Escape-Houdini-0.3.3.tar.gz, YANICK, 2020; MetaCPAN )
Escape-Houdini/contrib/benchmark.pl ( view source; MetaCPAN )
CPAN::API</a> to 
abstract</p>

<pre class="brush: perl">my $ua = LWP::UserAgent;
my $me = decode_json( 
    $ua-&gt;get( 'https://api.metacpan.org/author/YANICK'
)-&gt;content;
</pre>

<p>into</p>

<
WebService-Lobid-Organisation ( P/PM/PMAYR/WebService-Lobid-Organisation-0.005.tar.gz, PMAYR, 2020; MetaCPAN )
WebService-Lobid-Organisation/lib/WebService/Lobid/Organisation.pm ( view source; MetaCPAN )
or>

error message, if C<$self->status> is I<Error>

=back

=head1 DEPENDENCIES

L<HTTP::Tiny>, L<JSON>, L<Log::Any>, L<Moo>, L<Try::Tiny>

=head1 LOGGING

This module uses the L<Log::Any> Framework

 AND COPYRIGHT

GNU GPL V3

Peter Mayr 2016

=cut

use strict;
use warnings;

use HTTP::Tiny;
use JSON;
use Log::Any;
use Moo;
use Try::Tiny;

extends 'WebService::Lobid';

has isil => ( is => 'rw', p
LD {
    my $self = shift;

    my $query_string  = undef;
    my $response      = undef;
    my $json_result   = undef;
    my $result_ref    = undef;
    my $no_of_results = undef;
    my %data     
App-PerlTidy-Tk ( S/SZ/SZABGAB/App-PerlTidy-Tk-0.03.tar.gz, SZABGAB, 2020; MetaCPAN )
App-PerlTidy-Tk/lib/App/PerlTidy/Tk.pm ( view source; MetaCPAN )
e Browser::Open qw(open_browser open_browser_cmd);
use Cwd qw(getcwd);
use Cpanel::JSON::XS qw(encode_json decode_json);
use Data::Dumper qw(Dumper);
use File::HomeDir ();
use File::Spec ();
use Path:
s);
my $home = File::HomeDir->my_home;
my $config_file = File::Spec->catfile($home, '.perltidy-tk.json');
my @options = ('indent-columns', 'paren-tightness', 'brace-tightness', 'block-brace-tightness'
;
    usage() if $help;

    my $config = {};
    if (-e $config_file) {
        $config = decode_json(path($config_file)->slurp_utf8);
    }

    $self->{autotidy} = 0;

    $self->load_default_confi
WWW-YouTube-Download ( O/OA/OALDERS/WWW-YouTube-Download-0.65.tar.gz, OALDERS, 2020; MetaCPAN )
WWW-YouTube-Download/lib/WWW/YouTube/Download.pm ( view source; MetaCPAN )
5.008001;

our $VERSION = '0.65';

use Carp qw(croak);
use URI ();
use LWP::UserAgent;
use JSON::MaybeXS 'JSON';
use HTML::Entities qw/decode_entities/;
use HTTP::Request;
use MIME::Type;

$Carp::Inte
>_is_new($content)) {
      my $args        = $self->_get_args($content);
      my $player_resp = JSON()->new->decode($args->{player_response});
      $video_url_map  = $self->_decode_player_response(
s*=\s*(\{.*})/) {
            ($data, undef) = JSON->new->utf8(1)->decode_prefix($1);
            last;
        }
    }

    croak 'failed to extract JSON data' unless $data->{args};

    return $data
Perinci-Sub-Gen-AccessTable-Simple ( P/PE/PERLANCAR/Perinci-Sub-Gen-AccessTable-Simple-0.002.tar.gz, PERLANCAR, 2020; MetaCPAN )
Perinci-Sub-Gen-AccessTable-Simple/lib/Perinci/Sub/Gen/AccessTable/Simple.pm ( view source; MetaCPAN )
------+-----------'

 # unknown code
 % list_countries.pl --code xx

 # output json
 % list_countries.pl --code id --json
 [200, "OK", [{"en_name":"Indonesia","code":"id","id_name":"Indonesia"}]

=hea
App-GitGot ( G/GE/GENEHACK/App-GitGot-1.339.tar.gz, GENEHACK, 2020; MetaCPAN )
App-GitGot/lib/App/GitGot/Command/list.pm ( view source; MetaCPAN )
 (
    [ 'json|j' => 'stream output as JSON' ] ,
  );
}

sub _execute {
  my( $self, $opt, $args ) = @_;

  if ( $self->opt->json ) {
    try_load_class( 'JSON::MaybeXS' )
      or die "json serializi
ng requires the module 'JSON::MaybeXS' to be installed\n";

    my @data = map { {%$_}  } $self->active_repos;

    say JSON::MaybeXS->new(pretty => 1)->encode( \@data );
    return;
  }

  for my $re
Data-DFA ( P/PR/PRBRENAN/Data-DFA-20201031.tar.gz, PRBRENAN, 2020; MetaCPAN )
Data-DFA/lib/Data/DFA.pm ( view source; MetaCPAN )
                  # Symbols processed
   );
 }

sub dumpAsJson($)                                                               # Create a JSON string representing a B<$dfa>.
 {my ($dfa) = @_;        
finalStates}{$state} = $$dfa{$state}->final;                          # Final states
   }
  encodeJson($jfa);
 }

sub removeDuplicatedStates($)                                                   #P Rem
                   # Not in a final state

    ok $dfa->dumpAsJson eq <<END, q(dumpAsJson);                                  # Dump as json
  {
     "finalStates" : {
        "0" : null,
        "1" :
Z ( T/TO/TOBYINK/Z-0.008.tar.gz, TOBYINK, 2020; MetaCPAN )
Z/lib/Z.pm ( view source; MetaCPAN )
},
	encode_json => sub {
		if ( eval 'use JSON::MaybeXS 1.003000 (); 1' ) {
			return \&JSON::MaybeXS::encode_json;
		}
		require JSON::PP;
		return \&JSON::PP::encode_json;
	},
	decode_json => sub {
		if ( eval 'use JSON::MaybeXS 1.003000 (); 1' ) {
			return \&JSON::MaybeXS::decode_json;
		}
		require JSON::PP;
		return \&JSON::PP::decode_json;
	},
	STRICT => sub {
		$STRICT ? sub () { !!1 } : s
<Data::Dumper>, C<maybe> and C<provided> from
L<PerlX::Maybe>, C<encode_json> and C<decode_json> from
L<JSON::MaybeXS> or L<JSON::PP> (depending which is installed), and
C<STRICT> and C<LAX> from L<De
Net-OAuth2-AuthorizationServer ( L/LE/LEEJO/Net-OAuth2-AuthorizationServer-0.28.tar.gz, LEEJO, 2020; MetaCPAN )
Net-OAuth2-AuthorizationServer/lib/Net/OAuth2/AuthorizationServer/Manual.pod ( view source; MetaCPAN )
more information about JWTs and revoking tokens see
L<https://auth0.com/blog/2015/03/10/blacklist-json-web-token-api-keys/> and
L<https://tools.ietf.org/html/rfc7519>. Ultimately you're going to have 
uth 2.0 Client Authentication and Authorization Grants.

L<https://tools.ietf.org/html/rfc7523> - JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants.

L<https://
Zydeco-Lite-App ( T/TO/TOBYINK/Zydeco-Lite-App-0.001.tar.gz, TOBYINK, 2020; MetaCPAN )
Zydeco-Lite-App/lib/Zydeco/Lite/App.pm ( view source; MetaCPAN )
		
			if ( $file =~ /\.json$/i ) {
				my $decode =
					eval { require JSON::MaybeXS }
					? \&JSON::MaybeXS::decode_json
					: do { require JSON::PP; \&JSON::PP::decode_json };
				return $decode-
override it to return a list of filenames (not full path names, just
simple filenames like "myapp.json"), your app will use these filenames to
find configuration settings.

=item C<< find_config >>

I
s allows your system-wide config in C<< /etc/myapp.json >> to be overridden
by user-specific C<< ~/.config/myapp.json >> and a local C<< ./myapp.json >>.

You should rarely need to call this manually.
Ansible-Util ( G/GR/GRAVATTJ/Ansible-Util-0.001.tar.gz, GRAVATTJ, 2020; MetaCPAN )
Ansible-Util/lib/Ansible/Util/Vars.pm ( view source; MetaCPAN )

use Data::Printer alias => 'pdump';
use File::Temp 'tempfile', 'tempdir';
use Hash::DotPath;
use JSON;
use YAML ();
use Ansible::Util::Run;

with 'Ansible::Util::Roles::Constants';

#################
rated tempfiles for debugging/troubleshooting.  The tempfiles 
used are a playbook, template, and json output.

=over

=item type: Bool

=item required: no

=item default: 0

=back

=cut

has keepTemp
nice_json }} ";
	}

	$self->File->write( $templateFilename, join( "\n", @content ) );

	#
	# create a placeholder for the template output
	#
	my $outputFilename = $self->_getTempFile('-output.json');
App-Tk-Deparse ( S/SZ/SZABGAB/App-Tk-Deparse-0.02.tar.gz, SZABGAB, 2020; MetaCPAN )
App-Tk-Deparse/lib/App/Tk/Deparse.pm ( view source; MetaCPAN )
 (
    #     'geometry' => $self->{top}->geometry,
    # );
    # path($config_file)->spew(encode_json(\%config));

    exit;
}

1;

=head1 NAME

App::Tk::Deparse - Tk based GUI to experiment with B::
n the config file and next time we use that size to open the application.

    ~/.perl-tk-deparse.json

=head1 SEE ALSO

L<B::Deparse>

L<Tk>

L<Tk::HyperText>


=head1 COPYRIGHT AND LICENSE

Copyrigh
Data-Crumbr ( P/PO/POLETTIX/Data-Crumbr-0.1.2.tar.gz, POLETTIX, 2020; MetaCPAN )
Data-Crumbr/lib/Data/Crumbr/Util.pm ( view source; MetaCPAN )
:Crumbr
use strict;
use Carp;
use Scalar::Util qw< reftype blessed >;

sub json_leaf_encoder {
   require B;
   return \&_json_leaf_encode;
}

{
   my $slash_escaped;

   BEGIN {
      $slash_escaped 
     0x0A => 'n',
         0x0D => 'r',
         0x09 => 't',
      };
   } ## end BEGIN

   sub _json_leaf_encode {
      return 'null' unless defined $_[0];

      my $reftype = ref($_[0]);
      re
, $lo;
         }
      } split //, $_[0];
      return qq<"> . $string . qq<">;
   } ## end sub _json_leaf_encode
}

sub uri_encoder {
   require Encode;
   return \&_uri_encoder;
}

{
   my %is_unre
Data-Crumbr ( P/PO/POLETTIX/Data-Crumbr-0.1.2.tar.gz, POLETTIX, 2020; MetaCPAN )
Data-Crumbr/lib/Data/Crumbr/Default/URI.pm ( view source; MetaCPAN )
:URI::VERSION = '0.1.2';
# ABSTRACT: "JSON" profile for Data::Crumbr::Default
use Data::Crumbr::Util;

sub profile {
   my $json_encoder = Data::Crumbr::Util::json_leaf_encoder();
   my $uri_encoder  
_encoder,
      value_encoder     => $json_encoder,
   };
} ## end sub profile

1;

__END__

=pod

=encoding utf-8

=head1 NAME

Data::Crumbr::Default::URI - "JSON" profile for Data::Crumbr::Default

Data-Crumbr ( P/PO/POLETTIX/Data-Crumbr-0.1.2.tar.gz, POLETTIX, 2020; MetaCPAN )
Data-Crumbr/lib/Data/Crumbr/Default.pm ( view source; MetaCPAN )
h_vars >;
use Scalar::Util qw< blessed >;
use Data::Crumbr::Util;

my $jenc = Data::Crumbr::Util::json_leaf_encoder();
my $ienc = Data::Crumbr::Util::id_encoder();

has array_open        => (default =
Data-Crumbr ( P/PO/POLETTIX/Data-Crumbr-0.1.2.tar.gz, POLETTIX, 2020; MetaCPAN )
Data-Crumbr/lib/Data/Crumbr.pm ( view source; MetaCPAN )
')->($data);
   # here/hey "you"
   # here/what "ever"

   # JSON profile produces valid JSON "slices"
   $encoded = crumbr(profile => 'JSON')->($data);
   # {"here":{"hey":"you"}}
   # {"here":{"what
 [ 1..3 ],
         something => "funny \x{263A} ☻",
      },
   };

If you encode this e.g. in JSON, it will be easy to parse with
the right program, but not from the shell, even if you pretty
prin
m *

hash keys encoded as JSON strings, surrounded by curly brackets:

   hash_key_prefix   => '['
   hash_key_suffix   => ']'
   hash_key_encoder  => Data::Crumbr::Util::json_leaf_encoder

=item *

n
App-Notifier-Client ( S/SH/SHLOMIF/App-Notifier-Client-0.0401.tar.gz, SHLOMIF, 2020; MetaCPAN )
App-Notifier-Client/lib/App/Notifier/Client.pm ( view source; MetaCPAN )
 = '0.0401';
use strict;
use warnings;

use 5.012;

use LWP::UserAgent;
use URI;

use JSON::MaybeXS qw(encode_json);

sub notify
{
    my $class = shift;

    my ($args) = @_;

    my $base_url = $arg

    if ( defined($msg) )
    {
        push @$query,
            ( text_params => scalar( encode_json( { msg => $msg, } ) ) );
    }

    $url->query_form($query);

    my $response = $ua->get($url);
Nuvol ( T/TE/TEKKI/Nuvol-0.03.tar.gz, TEKKI, 2020; MetaCPAN )
Nuvol/lib/Nuvol/Office365/Drive.pm ( view source; MetaCPAN )
>connector->_ua_get($self->url);
  Carp::confess $res->message if $res->is_error;

  return $res->json;
}

1;

=encoding utf8

=head1 NAME

Nuvol::Office365::Drive - Internal methods for Office 365 dr
Rapi-Fs ( V/VA/VANSTYN/Rapi-Fs-1.105.tar.gz, VANSTYN, 2020; MetaCPAN )
Rapi-Fs/README.pod ( view source; MetaCPAN )


=back


=head2 Planned additional drivers

=over

=item * 

SSH/SFTP

=item * 

IMAP

=item * 

JSON/YAML files (i.e. browse data structure)

=item * 

Zip/archive

=item * 

Multipart/MIME

=back


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