Group
Extension

Matches 35358

mojo-debugbar ( C/CR/CRLCU/mojo-debugbar-v0.1.4.tar.gz, CRLCU, 2024; MetaCPAN )
mojo-debugbar/lib/Mojo/Debugbar/Monitor.pm ( view source; MetaCPAN )
package Mojo::Debugbar::Monitor;
use Mojo::Base -base;

use Mojo::JSON qw(encode_json);
use Mojo::Server;

has 'app' => sub { Mojo::Server->new->build_app('Mojo::HelloWorld') }, weak => 1;
has 'icon' 
PDK ( C/CA/CARELINE/PDK-0.014.tar.gz, CARELINE, 2024; MetaCPAN )
PDK/lib/PDK/Utils/UserAgent.pm ( view source; MetaCPAN )
ERL UA");

  # 请求链接并根据响应值做出相关动作
  # my $tx = $ua->get($url => json => $json);
  my $tx = $ua->get($url);
  if (my $err = $tx->error) {
    if ($err->{code}) {
      ret
 500, message => "Connection error: $err->{message}"};
    }
  }
  else {
    return $tx->result->json;
  }
}

#------------------------------------------------------------------------------
# 设定
#------------------------------------------------------------------------------
sub postJson {
  my ($url, $json) = @_;

  # 初始化并设定 UA 相关属性
  my $ua = Mojo::UserAgent->new(max_redi
Mojo-JWT ( J/JB/JBERGER/Mojo-JWT-1.01.tar.gz, JBERGER, 2024; MetaCPAN )
Mojo-JWT/lib/Mojo/JWT.pm ( view source; MetaCPAN )
r $VERSION = '1.01';
$VERSION = eval $VERSION;

use Scalar::Util ();
use List::Util ();
use Mojo::JSON ();

use CryptX;
use Crypt::Misc ();

use Carp ();

my $isa = sub { Scalar::Util::blessed $_[0] &
signature) = split /\./, $token;
  my $header = Mojo::JSON::decode_json Crypt::Misc::decode_b64u($hstring);
  my $claims = Mojo::JSON::decode_json Crypt::Misc::decode_b64u($cstring);
  $signature = Cr
thm };
  my $hstring = Crypt::Misc::encode_b64u Mojo::JSON::encode_json($header);
  my $cstring = Crypt::Misc::encode_b64u Mojo::JSON::encode_json($claims);
  my $payload = "$hstring.$cstring";
  my $
mojo-debugbar ( C/CR/CRLCU/mojo-debugbar-v0.1.4.tar.gz, CRLCU, 2024; MetaCPAN )
mojo-debugbar/lib/Mojo/Debugbar/Monitor/Session.pm ( view source; MetaCPAN )
age Mojo::Debugbar::Monitor::Session;
use Mojo::Base "Mojo::Debugbar::Monitor";

use Mojo::JSON qw(encode_json);


has 'icon' => '<i class="icon-cloud"></i>';
has 'name' => 'Session';

=head2 render

 $key (keys(%$session)) {
            my $value = $session->{ $key };
            $value = encode_json($value) if ref($value);

            push(@items, { key => $key, value => $value });
        }
  
Syntax-Kamelon ( H/HA/HANJE/Syntax-Kamelon-0.25.tar.gz, HANJE, 2024; MetaCPAN )
Syntax-Kamelon/lib/Syntax/Kamelon/Syntaxes.pod ( view source; MetaCPAN )
         5
 Haml                                    3
 Hamlet                                  3
 JSON                                    2
 JSP                                     2
 Javadoc         
PDK-Crate ( C/CA/CARELINE/PDK-Crate-0.002.tar.gz, CARELINE, 2024; MetaCPAN )
PDK-Crate/lib/PDK/Crate.pm ( view source; MetaCPAN )
item *

Perl::Critic

=item *

Getopt::Long

=item *

Log::Log4perl

=item *

Text::CSV

=item *

JSON::PP

=item *

File::Slurp

=item *

Excel::Writer::XLSX

=item *

Spreadsheet::ParseExcel

=item 
WebService-Xential ( W/WA/WATERKIP/WebService-Xential-0.004.tar.gz, WATERKIP, 2024; MetaCPAN )
WebService-Xential/lib/WebService/Xential.pm ( view source; MetaCPAN )
 OpenAPI::Client;
use Try::Tiny;
use Mojo::Content::Single;
use Mojo::Asset::Memory;
use JSON::XS qw(encode_json);
use Types::Serialiser qw();

field $api_key :param;
field $api_user :param;
field $ap
xt.oas/api';
field $client :accessor;


ADJUST {

    my $definition = sprintf('data://%s/xential.json', ref $self);

    $client = OpenAPI::Client->new($definition);

    my $host = Mojo::URL->new();
>ua->on(
      start => sub ($ua, $tx) {

        $tx->req->headers->add("Accept" => "application/json");

        unless ($tx->req->headers->header('XSessionID')) {
          $tx->req->url->userinfo(
Crate ( C/CA/CARELINE/Crate-0.003.tar.gz, CARELINE, 2024; MetaCPAN )
Crate/lib/Crate.pm ( view source; MetaCPAN )
item *

Perl::Critic

=item *

Getopt::Long

=item *

Log::Log4perl

=item *

Text::CSV

=item *

JSON::PP

=item *

File::Slurp

=item *

Excel::Writer::XLSX

=item *

Spreadsheet::ParseExcel

=item 
App-FirefoxMultiAccountContainersUtils ( P/PE/PERLANCAR/App-FirefoxMultiAccountContainersUtils-0.018.tar.gz, PERLANCAR, 2024; MetaCPAN )
App-FirefoxMultiAccountContainersUtils/lib/App/FirefoxMultiAccountContainersUtils.pm ( view source; MetaCPAN )
 clause is checked. so we currently still set
        # default value manually in _get_containers_json
        schema => 'firefox::local_profile_name::default_first*',
        pos => 0,
    },
);

our
    # default value manually in _get_containers_json
        schema => 'firefox::local_profile_name::default_first*',
    },
);

sub _get_containers_json {
    require App::FirefoxUtils;
    require F
ile::Copy;
    require File::Slurper;
    require Firefox::Util::Profile;
    require JSON::MaybeXS;

    my ($args, $do_backup) = @_;

    my $res;

    if ($do_backup) {
        $res = App::FirefoxU
Weather-MOSMIX ( C/CO/CORION/Weather-MOSMIX-0.04.tar.gz, CORION, 2024; MetaCPAN )
Weather-MOSMIX/lib/Weather/WeatherGov.pm ( view source; MetaCPAN )
:WeatherGov;
use strict;
use warnings;
our $VERSION = '0.04';

use HTTP::Tiny;
use URI;
use JSON 'decode_json';

use Moo 2;
use feature 'signatures';
no warnings 'experimental::signatures';

our $base
uch we hit weather.gov
    my $loc = $self->json_request($entry);
    $self->json_request(
        $loc->{properties}->{forecastHourly},
    );

}

sub json_request( $self, $uri ) {
    my $response =
 $self->ua->request(GET => $uri, {
        accept => 'JSON-LD',
    } );
    decode_json( $response->{content} );
}

1;

=head1 SEE ALSO

L<https://www.weather.gov/documentation/services-web-api>

L<h
Weather-MOSMIX ( C/CO/CORION/Weather-MOSMIX-0.04.tar.gz, CORION, 2024; MetaCPAN )
Weather-MOSMIX/lib/Weather/MOSMIX/Writer.pm ( view source; MetaCPAN )
MOSMIX::Writer;
use strict;
use Moo 2;
use experimental 'signatures';
use DBI;
require POSIX;
use JSON;

=head1 NAME

Weather::MOSMIX::Writer - Write MOSMIX weather forecast data to a DBI handle

=hea
(
    is => 'lazy',
    default => \&_prepare_forecast_sth,
);

has 'json' => (
    is => 'lazy',
    default => sub {
        JSON->new()
    },
);

sub _prepare_location_sth( $self ) {
    $self->db
or_fetch(sub {
        my $rec = $records[$i++];
        return if ! $rec;
        my $f = $self->json->encode( $rec->{forecasts} );
        [$rec->{name}, $f, $expiry, $rec->{issuetime}]
    });
};

Parse-LocalDistribution ( I/IS/ISHIGAKI/Parse-LocalDistribution-0.20.tar.gz, ISHIGAKI, 2024; MetaCPAN )
Parse-LocalDistribution/lib/Parse/LocalDistribution.pm ( view source; MetaCPAN )
  my @manifind = @{$self->{MANIFOUND}};

  my $json = List::Util::reduce { length $a < length $b ? $a : $b }
             grep !m|/t/|, grep m|/META\.json$|, @manifind;
  my $yaml = List::Util::reduce
.json located only in a subdirectory should not precede
  # META.yml located in the top directory. (eg. Test::Module::Used 0.2.4)
  if ($json && $yaml && length($json) > length($yaml) + 1) {
    $json

  unless ($json || $yaml) {
    $self->{METAFILE} = "No META.yml or META.json found";
    $self->_verbose(1,"No META.yml or META.json in $dist");
    return;
  }

  for my $metafile ($json || $yaml) 
Weather-MOSMIX ( C/CO/CORION/Weather-MOSMIX-0.04.tar.gz, CORION, 2024; MetaCPAN )
Weather-MOSMIX/lib/Weather/MOSMIX.pm ( view source; MetaCPAN )
package Weather::MOSMIX;
use strict;
use Moo 2;
use experimental 'signatures';
use DBI;
use JSON;
use DBD::SQLite 1.56; # some virtual table bugfixes
use Weather::MOSMIX::Weathercodes 'mosmix_weatherc
ooX::Role::DBIConnection';

our $TIMESTAMP = '%Y-%m-%dT%H:%M:%S';

has 'json' => (
    is => 'lazy',
    default => sub {
		JSON->new()
	},
);

# Convert an array into an SQLite virtual table
# This s
tance asc, expiry desc
            limit 1
SQL
    for (@$res) {
        $_->{forecasts} = $self->json->decode($_->{forecasts})
    };
    $res->[0]
};

sub forecast_dbh( $self, %options ) {
    my $r
Weather-MOSMIX ( C/CO/CORION/Weather-MOSMIX-0.04.tar.gz, CORION, 2024; MetaCPAN )
Weather-MOSMIX/script/dump-locations.pl ( view source; MetaCPAN )
#!perl
package main;
use strict;
use Weather::MOSMIX;
use JSON 'encode_json';
use Weather::MOSMIX;
use Getopt::Long;

our $VERSION = '0.04';

GetOptions(
    'dsn=s'   => \my $dsn,
);

$dsn ||= 'dbi:S
QLite:dbname=mosmix-forecast.sqlite';
my $w = Weather::MOSMIX->new(
    dbh => {
        dsn => $dsn
    },
);

my $f = $w->locations();
binmode STDOUT, ':encoding(UTF-8)';
print encode_json($f);
Data-Hopen ( C/CX/CXW/Data-Hopen-0.000021.tar.gz, CXW, 2024; MetaCPAN )
Data-Hopen/support/cpanfile.pl ( view source; MetaCPAN )
sumes MYMETA.json has already been created.
use strict;
use warnings;

use CPAN::Meta;
use File::Slurp qw(write_file);
use Module::CPANfile;

my $meta = CPAN::Meta->load_file("MYMETA.json");
my $file 
Generate ( J/JA/JANESKIL/Tools/Generate-0.03.tar.gz, JANESKIL, 2024; MetaCPAN )
Generate/lib/Generate/Sql/Table.pm ( view source; MetaCPAN )
   my $json_arr = $self->json;
        my $length = scalar @{$json_arr};
        for (my $i = 0; $i < $length; $i++) {
            my $json = @{$json_arr}[$i];
            if (exists($self->json->{tab
les})) {
                my $tables = $self->json->{tables};
                my $len = scalar @{$tables};
                for(my $j = 0; $j < $len; $j++){
                    my $table = $self->shift_
eturn $template;

    }

    method create_sql($json, $tablename) {
        my $sql_stmt = Generate::Sql::Table::Sql->new(
            json      => $json,
            template  => $self->template,
   
LINE-Bot-API ( G/GU/GUGOD/LINE-Bot-API-1.21.tar.gz, GUGOD, 2024; MetaCPAN )
LINE-Bot-API/lib/LINE/Bot/API.pm ( view source; MetaCPAN )
{
    my($self, $json, $signature) = @_;
    LINE::Bot::API::Event->validate_signature($json, $self->{channel_secret}, $signature);
}

sub parse_events_from_json {
    my($self, $json) = @_;
    LINE:
:Bot::API::Event->parse_events_json($json);
}

sub issue_link_token {
    my($self, $user_id) = @_;
    my $res = $self->request(post => "user/${user_id}/linkToken", +{});
    LINE::Bot::API::Response
0, [], ['failed to validate signature']];
        }

        my $events = $bot->parse_events_from_json($req->content);
        for my $event (@{ $events }) {
            next unless $event->is_message
RundeckAPI ( X/XA/XAVIERH/RundeckAPI-1.3.8.0.tar.gz, XAVIERH, 2024; MetaCPAN )
RundeckAPI/lib/RundeckAPI.pm ( view source; MetaCPAN )
erAgent;
use Data::Dumper;
use HTTP::Cookies;
use REST::Client;
use Scalar::Util qw(reftype);
use JSON;
use Storable qw(dclone);
use Exporter qw(import);

our @EXPORT_OK = qw(get post put delete postD
"Content-Type", 'application/x-www-form-urlencoded');
	$client->addHeader ("Accept", "application/json");
	$self->{'client'} = $client;

# if we have a token, use it
	if (defined $self->{'token'}) {
	
a POST request
#
# @param  endpoint, the JSON to POST
# @retval the response
#*

sub post(){		# endpoint, json
	my $self = shift;
	my $endpt = shift;
	my $json = shift;

	my $endpoint = "";

	if ($end
LINE-Bot-API ( G/GU/GUGOD/LINE-Bot-API-1.21.tar.gz, GUGOD, 2024; MetaCPAN )
LINE-Bot-API/lib/LINE/Bot/Message/Narrowcast.pm ( view source; MetaCPAN )
    "upToRemainingQuota": JSON::true,
    }

Noted here that the value for "upToRemainingQuotae" must be one of the boolean values recognizied by L<JSON::XS>. See also L<JSON::XS/"other references">.
LINE-Bot-API ( G/GU/GUGOD/LINE-Bot-API-1.21.tar.gz, GUGOD, 2024; MetaCPAN )
LINE-Bot-API/lib/LINE/Bot/API/Client/Furl.pm ( view source; MetaCPAN )
url::Headers;
use JSON::XS;

use LINE::Bot::API;
use LINE::Bot::API::Client;

our @CARP_NOT = qw( LINE::Bot::API::Client::Furl LINE::Bot::API::Client LINE::Bot::API);
my $JSON = JSON::XS->new->utf8;

ing API error: response body is empty.';
    }

    my ($ret, $error);
    eval {
        $ret = $JSON->decode($response_body);
        1;
    } or do {
        $error = $@;
    };

    if ($error) {
ers = [];
    } elsif (@_ == 4) {
        ($self, $url, $headers, $data) = @_;
    }

    my $json = $JSON->encode($data);
    my($res_minor_version, $res_status, $res_msg, $res_headers, $res_content)

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