Group
Extension

Matches 35359

Weixin-Client ( S/SJ/SJDY/Weixin-Client-2.1.tar.gz, SJDY, 2016; MetaCPAN )
Weixin-Client/lib/Weixin/Client/Private/_update_chatroom_member.pm ( view source; MetaCPAN )
$json = $self->http_post(gen_url($api,@query_string),("Content-Type"=>"application/json; charset=UTF-8"),Content=>$self->json_encode($post)); 
    return unless defined $json;
    my $d = $self->json_
decode($json);
    return unless defined $d;
    return if $d->{BaseResponse}{Ret}!=0;
    return if $d->{Count}==0;
    my %member_info; 
    my @member_key = qw(HeadImgUrl NickName PYInitial PYQuanP
MooX-Log-Any ( C/CA/CAZADOR/MooX-Log-Any-0.004004.tar.gz, CAZADOR, 2016; MetaCPAN )
MooX-Log-Any/lib/MooX/Log/Any.pm ( view source; MetaCPAN )
::Log::LogDispatch> this can be thought of as a common logging interface.

  package MyApp::View::JSON;

  extends 'MyApp::View';
  with 'MooseX:Log::Log4perl';

  sub bar {
    $self->logger->info("E
HTML-Microdata ( S/SA/SATOH/HTML-Microdata-0.05.tar.gz, SATOH, 2016; MetaCPAN )
HTML-Microdata/lib/HTML/Microdata.pm ( view source; MetaCPAN )
warnings;

use HTML::TreeBuilder::LibXML;
use Hash::MultiValue;
use Scalar::Util qw(refaddr);
use JSON;
use URI;

our $VERSION = '0.05';

sub new {
	my ($class, %args) = @_;
	bless {
		items => [],
		
 = @_;
	my $self = $class->new(%opts);
	$self->_parse($content);
	$self
}

sub as_json {
	my ($self) = @_;
	encode_json +{
		items => $self->{items},
	};
}

sub items {
	my ($self) = @_;
	$self->{item
  my $json = $microdata->as_json;

  use Data::Dumper;
  warn Dumper $microdata->items; # returns top level items


=head1 DESCRIPTION

HTML::Microdata is extractor of microdata from HTML to JSON etc.
HTTP-Thin-UserAgent ( P/PE/PERIGRIN/HTTP-Thin-UserAgent-0.016.tar.gz, PERIGRIN, 2016; MetaCPAN )
HTTP-Thin-UserAgent/lib/HTTP/Thin/UserAgent.pm ( view source; MetaCPAN )
t;

    use Moo;
    use MooX::late;
    use MooX::ChainedAttributes;
    use HTTP::Thin;
    use JSON::Any;
    use Try::Tiny;
    use Scalar::Util qw/weaken/;
    use Carp qw(confess);

    use cons
s_json {
        my $self = shift;

        my $request = $self->request;

        $request->header(
            'Accept'       => 'application/json',
            'Content-Type' => 'application/json',

        );

        if ( my $data = shift ) {
            $request->content( JSON::Any->encode($data) );
        }

        weaken($self);
        $self->decoder(
            sub {
                my
Weixin-Client ( S/SJ/SJDY/Weixin-Client-2.1.tar.gz, SJDY, 2016; MetaCPAN )
Weixin-Client/lib/Weixin/Client/Private/_get_chatroom.pm ( view source; MetaCPAN )
$json = $self->http_post(gen_url($api,@query_string),("Content-Type"=>"application/json; charset=UTF-8"),Content=>$self->json_encode($post)); 
    return unless defined $json;
    my $d = $self->json_
decode($json);
    return unless defined $d;
    return if $d->{BaseResponse}{Ret}!=0;
    my @member_key = qw(HeadImgUrl NickName PYInitial PYQuanPin Alias Province City Sex Id Uin Signature DisplayN
Google-reCAPTCHA ( T/TC/TCORKRAN/Google-reCAPTCHA-0.06.tar.gz, TCORKRAN, 2016; MetaCPAN )
Google-reCAPTCHA/lib/Google/reCAPTCHA.pm ( view source; MetaCPAN )
package Google::reCAPTCHA;

use strict;
use warnings;

use Carp;
use LWP::UserAgent;
use JSON qw( decode_json );
use Params::Validate qw( validate SCALAR );

our $VERSION = '0.06';

use constant URL =
ponse = $ua->post( URL , $pd );
    
    if ( $response->is_success)  {
        my $data = decode_json( $response->decoded_content );
        
        if ( exists ( $data->{'error-codes'} ) ) {
      
Badge-Depot-Plugin-Perl ( C/CS/CSSON/Badge-Depot-Plugin-Perl-0.0103.tar.gz, CSSON, 2016; MetaCPAN )
Badge-Depot-Plugin-Perl/lib/Badge/Depot/Plugin/Perl.pm ( view source; MetaCPAN )
seX::AttributeShortcuts;
use Types::Standard qw/Str Bool/;
use Types::URI qw/Uri/;
use JSON::MaybeXS 'decode_json';
use Path::Tiny;
with 'Badge::Depot';

our $VERSION = '0.0103'; # VERSION
# ABSTRACT:
 $self = shift;

    return 'unknown' if !path('META.json')->exists;

    my $json = path('META.json')->slurp_utf8;
    my $data = decode_json($json);

    return 'unknown' if !exists $data->{'prereqs
META.json> and uses that.

It is set to 'unknown' if it is neither given or exists in C<META.json>.

=head2 trailing

A string to add after the version, if the version is fetched from C<META.json>. De
Doorman ( G/GU/GUGOD/Doorman-0.10.tar.gz, GUGOD, 2016; MetaCPAN )
Doorman/lib/Plack/Middleware/DoormanAuth0.pm ( view source; MetaCPAN )
th0;
use 5.010;
use parent 'Doorman::PlackMiddleware';
use strict;
use LWP::UserAgent;
use JSON qw/decode_json/;
use namespace::autoclean;

our $VERSION   = "0.01";
our $AUTHORITY = "https://recollect
 ($resp->is_success) {
        my $data = eval { decode_json($resp->content) } || {};
        if ($@) {
            warn "Auth0: Got invalid JSON in Auth exchange: "
                . "code=$code stat
 ($resp->is_success) {
        my $data = eval { decode_json($resp->content) } || {};
        if ($@) {
            warn "Auth0: Got invalid JSON in /userinfo: "
                . "token=$access_token
Bio-Community ( F/FA/FANGLY/Bio-Community-0.001008.tar.gz, FANGLY, 2016; MetaCPAN )
Bio-Community/lib/Bio/Community/IO/Driver/biom.pm ( view source; MetaCPAN )
ce::autoclean;
use Bio::Community::Member;
use Bio::Community::TaxonomyUtils;
use JSON::XS qw( decode_json encode_json );
use DateTime;

use constant BIOM_NAME        => 'Biological Observation Matrix

);


has '_json' => (
   is => 'rw',
   #isa => 'JSON::XS',
   required => 0,
   init_arg => undef,
   default => undef,
   lazy => 1,
   predicate => '_has_json',
   reader => '_get_json',
   writer
lf->_get_max_col) {
      $name = $self->_get_json->{'columns'}->[$col-1]->{'id'};
   }
   $self->_set_col( $col );
   return $name;
}


method _parse_json () {
   # Retrieve all text content
   my $s
Tak ( M/MS/MSTROUT/Tak-0.001004.tar.gz, MSTROUT, 2016; MetaCPAN )
Tak/lib/Tak/Role/ObjectMangling.pm ( view source; MetaCPAN )
use JSON::PP qw(encode_json decode_json);

use Moo::Role;

requires 'inflate';
requires 'deflate';

has encoder_json => (is => 'lazy');
has decoder_json => (is => 'lazy');

sub _build_encoder_json {
 
ow_nonref(1)->convert_blessed(1);
}

sub _build_decoder_json {
  my $self = shift;
  weaken($self);
  JSON::PP->new->allow_nonref(1)->filter_json_single_key_object(
    __proxied_object__ => sub { $se
ERSAL::TO_JSON = sub { $self->deflate($_[0]) };
  decode_json($self->encoder_json->encode($data));
}

sub decode_objects {
  my ($self, $data) = @_;
  $self->decoder_json->decode(encode_json($data));
JSON-ReadPath ( M/MI/MICVU/JSON-ReadPath-3.01.tar.gz, MICVU, 2016; MetaCPAN )
JSON-ReadPath/bin/read_json.pl ( view source; MetaCPAN )
#!/usr/bin/env perl
my $app = qx{which read_json};
chomp $app;
require $app;
Mason-Plugin-WithEncoding ( D/DA/DAVEBAIRD/Mason-Plugin-WithEncoding-0.2.tar.gz, DAVEBAIRD, 2016; MetaCPAN )
Mason-Plugin-WithEncoding/lib/Mason/Plugin/WithEncoding.pm ( view source; MetaCPAN )
l loads content into the Plack::Response object

    if ($self->res->content_type ne "application/json") { # already UTF8 encoded
        my $content = $self->res->content;
        my $bytes = encode(
nd_json' => sub {
    my $orig = shift;
    my $self = shift;
    my $data = shift;

    my $enc = $conf->get( 'server.encoding.response' => undef );

    try {
        # calls JSON::XS::encode_json($
     if ($self->aborted($err)) {     # expected
            $self->res->content_type("application/json; charset=$enc") if $enc; # it's already set, but without charset
            $err->rethrow;
     
Convert-Pluggable ( E/EL/ELOHMROW/Convert-Pluggable-0.0322.tar.gz, ELOHMROW, 2016; MetaCPAN )
Convert-Pluggable/lib/Convert/Pluggable.pm ( view source; MetaCPAN )

use Data::Float qw/float_is_infinite float_is_nan/;
use Scalar::Util qw/looks_like_number/;

use JSON;
use Switch;

our @EXPORT_OK = qw(convert get_units);

our $VERSION           = '0.0322';
our $DE
'NO_DATA_FILE' ) {

        $units = encode_json( old_get_units() );

    }
    else {
        $units = read_file($data_file);
    }

    return decode_json($units);
}

# does it make sense to return 
tly only supports JSON) - then you will be able to use C::P as a service.  See examples/service.pl 
for an example Dancer2 script.  See data/units.json for an example of a valid json data set. 

See t
Mason-Plugin-WithEncoding ( D/DA/DAVEBAIRD/Mason-Plugin-WithEncoding-0.2.tar.gz, DAVEBAIRD, 2016; MetaCPAN )
Mason-Plugin-WithEncoding/lib/Mason/Plugin/WithEncoding/t/NoUTF8.pm ( view source; MetaCPAN )
pe_charset, undef, 'Got correct content-type charset');

        # std config, json content
        my $expected_from_json = {
            foo => 'bar',
            baz => [qw(barp beep)],
           
0.1:9999/json");
        #warn $mech->content;
        # see comments in UTF8.pm for why I can't use cmp_deeply
        #cmp_deeply(JSON->new->utf8->decode($mech->content), $expected_from_json, 'Decod
ected data from JSON');   # fails '�' - that's what is in the content
        #cmp_deeply(JSON->new->decode($mech->content), $expected_from_json, 'Decoded expected data from JSON');         # fa
Tak ( M/MS/MSTROUT/Tak-0.001004.tar.gz, MSTROUT, 2016; MetaCPAN )
Tak/lib/Tak/JSONChannel.pm ( view source; MetaCPAN )
package Tak::JSONChannel;

use JSON::PP qw(encode_json decode_json);
use IO::Handle;
use Scalar::Util qw(weaken);
use Log::Contextual qw(:log);
use Moo;

has read_fh => (is => 'ro', required => 1);
ha
ine {
  my ($self, $line) = @_;
  my $data = eval { decode_json($line) };
  unless ($data) {
    $self->write_message(mistake => invalid_json => $@||'No data and no exception');
    return;
  }
  unle
b write_message {
  my ($self, @msg) = @_;
  my $json = eval { encode_json(\@msg) };
  unless ($json) {
    $self->_raw_write_message(
      encode_json(
        [ failure => invalid_message => $@||'N
Mason-Plugin-WithEncoding ( D/DA/DAVEBAIRD/Mason-Plugin-WithEncoding-0.2.tar.gz, DAVEBAIRD, 2016; MetaCPAN )
Mason-Plugin-WithEncoding/lib/Mason/Plugin/WithEncoding/Test/Class.pm ( view source; MetaCPAN )
_for_tests('dies')),  poet => $poet);
    $self->add_comp(path => '/json.mc',  src => encode('UTF-8', $self->content_for_tests('json')),  poet => $poet);
}

sub content_for_tests {
    my ($self, $wan
ING UNESCAPED: <% uri_unescape(\$m->req->query_string) %>

ASCII

    my $src_json = <<SRC;
<\%init>
    my \$data_for_json = {
        foo => 'bar',
        baz => [qw(barp beep)],
        9 => { one
\$data_for_json);
SRC



    return $src_utf8        if $want eq 'utf8';
    return $src_plain       if $want eq 'plain';
    return $src_utf8_dies   if $want eq 'dies';
    return $src_json        if
Tak ( M/MS/MSTROUT/Tak-0.001004.tar.gz, MSTROUT, 2016; MetaCPAN )
Tak/lib/Tak/STDIONode.pm ( view source; MetaCPAN )
mer> - brilliant. beautiful. insane. extensive. excessive. try it.
  
  L<JSON::XS> - no, really. If it's just plain data, JSON is a great option.
  
  =head1 AUTHOR
  
  mst - Matt S. Trout <mst@shad
ore details.
EXPORTER_DECLARE_SPECS

$fatpacked{"JSON/PP.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'JSON_PP';
  package JSON::PP;
  
  # JSON-2.0
  
  use 5.005;
  use strict;
  use base qw(
se Carp ();
  use B ();
  #use Devel::Peek;
  
  $JSON::PP::VERSION = '2.27203';
  
  @JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
  
  # instead of hash-access, i tried index-ac
Mason-Plugin-WithEncoding ( D/DA/DAVEBAIRD/Mason-Plugin-WithEncoding-0.2.tar.gz, DAVEBAIRD, 2016; MetaCPAN )
Mason-Plugin-WithEncoding/lib/Mason/Plugin/WithEncoding/t/UTF8.pm ( view source; MetaCPAN )
e charset');

        # utf8 config, json content
        $mech->get_ok("http://127.0.0.1:9999/json");
        #warn $mech->content;
        my $expected_from_json = {
            foo => 'bar',
      
_deeply(JSON->new->utf8->decode($mech->content), $expected_from_json, 'Decoded and de-JSONified expected data from JSON');

        #   this doesn't work
        #my $expected_mangled_from_json = {%$e
xpected_from_json, heart => '�'};  # �
        #   I can't figure out how to get this test to work. The cmp_deeply fails if fed
        #   the unmangled hashref as expected, I
        #  
Shadowd-Connector ( Z/ZI/ZITHB/Shadowd-Connector-2.0.0.tar.gz, ZITHB, 2016; MetaCPAN )
Shadowd-Connector/lib/Shadowd/Connector.pm ( view source; MetaCPAN )
package Shadowd::Connector;

use 5.010;
use strict;

use JSON;
use Config::IniFiles;
use IO::Socket;
use IO::Socket::SSL;
use Crypt::Mac::HMAC qw(hmac_hex);
use Attribute::Abstract;
use POSIX qw(strft
 STATUS_BAD_REQUEST               => 2,
    STATUS_BAD_SIGNATURE             => 3,
    STATUS_BAD_JSON                  => 4,
    STATUS_ATTACK                    => 5,
    STATUS_CRITICAL_ATTACK     
' . $!);
    binmode $handler;

    my $content = <$handler>;
    my $json = decode_json($content);

    foreach my $entry (@$json) {
        if (!defined $entry->{'path'} && defined $entry->{'caller'
Weather-OpenWeatherMap ( A/AV/AVENJ/Weather-OpenWeatherMap-0.005004.tar.gz, AVENJ, 2016; MetaCPAN )
Weather-OpenWeatherMap/lib/Weather/OpenWeatherMap/Test.pm ( view source; MetaCPAN )
nt'  ? 'current.json'
    : $type =~ /^3day/    ? '3day.json'
    : $type eq 'forecast' ? '3day.json'
    : $type eq 'hourly'   ? 'hourly.json'
    : $type eq 'failure'  ? 'failure.json'
    : $type e
q 'error'    ? 'failure.json'
    : $type eq 'find'     ? 'find.json'
    : $type eq 'search'   ? 'find.json'
    : confess "Unknown type $type"
  );
  path($path)->slurp_utf8
}

{ package
    Weather
ecast_json} )
        : HTTP::Response->new( 200 => undef => [] => $self->{hourly_json} )
    } elsif ($url =~ /find/) {
      return HTTP::Response->new( 200 => undef => [] => $self->{find_json} )
  

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