Group
Extension

Matches 35358

Zapp ( P/PR/PREACTION/Zapp-0.005.tar.gz, PREACTION, 2021; MetaCPAN )
Zapp/lib/Zapp.pm ( view source; MetaCPAN )
ures;
use Scalar::Util qw( blessed );
use Yancy::Util qw( load_backend );
use Mojo::JSON qw( encode_json decode_json );
use Mojo::Loader qw( find_modules load_class );
use Mojo::File qw( curfile );
us
   # XXX: Make Yancy support this basic CRUD with relationships?
    # XXX: Otherwise, add custom JSON API
    $self->routes->get( '/plan/create' )
        ->to( 'plan#edit_plan' )->name( 'zapp.create
 'task_id' } ),
        ];
        for my $task ( @$tasks ) {
            $task->{input} = decode_json( $task->{input} );
        }

        my $inputs = $plan->{inputs} = [
            $self->yancy->
Zapp ( P/PR/PREACTION/Zapp-0.005.tar.gz, PREACTION, 2021; MetaCPAN )
Zapp/lib/Zapp/Trigger.pm ( view source; MetaCPAN )
ALSO
#pod
#pod L<Zapp>
#pod
#pod =cut

use Mojo::Base -base, -signatures;
use Mojo::JSON qw( decode_json encode_json );
use Scalar::Util qw( blessed );
use Mojo::Loader qw( data_section );

#pod =attr
{state} //= "inactive";
    # XXX: Auto-encode JSON in Yancy
    $data->{config} = encode_json( $data->{config} // {} );
    $data->{input} = encode_json( $data->{input} // {} );

    return $self->ap
, $trigger_id, $data ) {
    # XXX: Auto-encode JSON in Yancy
    $data->{config} &&= encode_json( $data->{config} );
    $data->{input} &&= encode_json( $data->{input} );
    return $self->app->yancy
Zapp ( P/PR/PREACTION/Zapp-0.005.tar.gz, PREACTION, 2021; MetaCPAN )
Zapp/lib/Zapp/Util.pm ( view source; MetaCPAN )
lot;
}

#pod =sub get_path_from_schema
#pod
#pod Get the schema for a given path out of the given JSON Schema. Will traverse
#pod object C<properties> and array C<items> to find the schema.
#pod
#pod 
of the given data.

=head2 get_path_from_schema

Get the schema for a given path out of the given JSON Schema. Will traverse
object C<properties> and array C<items> to find the schema.

=head2 prefix_
Zapp ( P/PR/PREACTION/Zapp-0.005.tar.gz, PREACTION, 2021; MetaCPAN )
Zapp/lib/Zapp/Task.pm ( view source; MetaCPAN )
t
#pod and an output template to display its output. Task input and output are
#pod declared with JSON Schema (see the L</schema> method), and input will be
#pod processed with L<Zapp::Formula> before
e 'Minion::Job', -signatures;
use List::Util qw( uniq );
use Time::Piece;
use Mojo::JSON qw( decode_json encode_json );
use Zapp::Util qw( get_path_from_data get_path_from_schema );
use Yancy::Util qw
cessible from
# $self->app->zapp->run()
has _context => sub( $self ) {
    my $run_input = decode_json( $self->zapp_run->{ input } );
    my %context;
    for my $input ( @$run_input ) {
        my $t
Zapp ( P/PR/PREACTION/Zapp-0.005.tar.gz, PREACTION, 2021; MetaCPAN )
Zapp/lib/Zapp/Trigger/Webhook.pm ( view source; MetaCPAN )
od =head1 SEE ALSO
#pod
#pod =cut

use Mojo::Base 'Zapp::Trigger', -signatures;
use Mojo::JSON qw( decode_json );
use Scalar::Util qw( blessed );
use Yancy::Util qw( currym );

sub install( $self, $ap
$hook;
    # XXX: Yancy has no JSON query capability...
    for my $h ( $c->yancy->list( zapp_triggers => { type => $self->moniker } ) ) {
        # XXX: Auto-decode JSON fields in Yancy
        my $c
DBIx-Class-Schema-Config ( S/SY/SYMKAT/DBIx-Class-Schema-Config-0.001014.tar.gz, SYMKAT, 2021; MetaCPAN )
DBIx-Class-Schema-Config/lib/DBIx/Class/Schema/Config.pm ( view source; MetaCPAN )
  use LWP::Simple;
    use JSON

    # Load credentials from internal web server.
    sub load_credentials {
        my ( $class, $config ) = @_;

        return decode_json(
            get( "http://
LinkEmbedder ( J/JH/JHTHORSEN/LinkEmbedder-1.20.tar.gz, JHTHORSEN, 2021; MetaCPAN )
LinkEmbedder/lib/LinkEmbedder/Link.pm ( view source; MetaCPAN )
title'     => ['meta[property="og:title"]',       'meta[name="twitter:title"]', 'title'],
);

my @JSON_ATTRS = (
  'author_name',      'author_url',    'cache_age',       'height', 'provider_name', 'p
O_JSON {
  my $self = shift;
  my %json;

  for my $attr (grep { defined $self->$_ } @JSON_ATTRS) {
    $json{$attr} = $self->$attr;
    $json{$attr} = "$json{$attr}" if $attr =~ /url$/;
  }

  $json{
html} = $self->html unless $self->type eq 'link';

  return \%json;
}

sub _dump { Mojo::Util::dumper($_[0]->TO_JSON); }

sub _el {
  my ($self, $dom, @sel) = @_;
  @sel = @{$DOM_SEL{$sel[0]}} if $DOM
LinkEmbedder ( J/JH/JHTHORSEN/LinkEmbedder-1.20.tar.gz, JHTHORSEN, 2021; MetaCPAN )
LinkEmbedder/lib/LinkEmbedder.pm ( view source; MetaCPAN )
package LinkEmbedder;
use Mojo::Base -base;

use LinkEmbedder::Link;
use Mojo::JSON;
use Mojo::Loader 'load_class';
use Mojo::Promise;
use Mojo::UserAgent;

use constant TLS => eval { require IO::Sock
rve {
  my ($self, $c, $args) = @_;
  my $format = $c->stash('format') || $c->param('format') || 'json';
  my $log_level;

  $args ||= {url => $c->param('url')};
  $log_level = delete $args->{log_leve
>html)   if $format eq 'html';

    my $json = $err ? {err => $err->{code} || 500} : $link->TO_JSON;
    return $c->render(json => $json) unless $format eq 'jsonp';

    my $name = $c->param('callback
Dist-Zilla-BeLike-CSJEWELL ( C/CS/CSJEWELL/Dist-Zilla-BeLike-CSJEWELL-0.994-TRIAL.tar.gz, CSJEWELL, 2021; MetaCPAN )
Dist-Zilla-BeLike-CSJEWELL/lib/Dist/Zilla/Plugin/CSJEWELL/ReleaseStatusFromMetaJSON.pm ( view source; MetaCPAN )
package Dist::Zilla::Plugin::CSJEWELL::ReleaseStatusFromMetaJSON;

our $VERSION = v0.001;

use v5.10;
use JSON::MaybeXS qw();
use Moose;
with 'Dist::Zilla::Role::ReleaseStatusProvider';

sub provide_r
_status {
    my ($self) = @_;
    my ($file) = grep { $_->name eq 'META.json' } @{ $self->zilla->files };
    my $ref    = JSON::MaybeXS->new()->utf8->decode($file->encoded_content);

    my $status 
END__

=pod

=encoding UTF-8

=head1 NAME

Dist::Zilla::Plugin::CSJEWELL::JSONReleaseStatus - Set release status from META.json

=head1 VERSION

version 0.994

=for Pod::Coverage provide_release_statu
LinkEmbedder ( J/JH/JHTHORSEN/LinkEmbedder-1.20.tar.gz, JHTHORSEN, 2021; MetaCPAN )
LinkEmbedder/lib/LinkEmbedder/Link/Github.pm ( view source; MetaCPAN )
scription($text);
    last;
  }
}

sub _parse_gist {
  my ($self, $tx) = @_;
  $self->_learn_from_json($tx);
  return $self unless $self->{files};
  return $self->type('rich')->template([__PACKAGE__, 
JSON-Create ( B/BK/BKB/JSON-Create-0.35.tar.gz, BKB, 2021; MetaCPAN )
JSON-Create/lib/JSON/Create.pod ( view source; MetaCPAN )
ncoding UTF-8

=head1 NAME

JSON::Create - Create JSON

=head1 SYNOPSIS

    
    use JSON::Create 'create_json';
    my %hash = (a => 'b', c => 'd');
    print create_json (\%hash);
    


produces o
is.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Create-0.35/examples/synopsis.pl> in the distribution.)


=head1 VERSION

This document describes JSON::Create version 0.35,
corresponding to L<git 
k/json-create/commit/ffe5ce4b3304dac8f668133563a276f831966bbe> at Fri Jul 16 07:42:12 2021 +0900.

=head1 DESCRIPTION

JSON::Create encodes Perl variables into JSON. The basic routine
L</create_json> 
LinkEmbedder ( J/JH/JHTHORSEN/LinkEmbedder-1.20.tar.gz, JHTHORSEN, 2021; MetaCPAN )
LinkEmbedder/lib/LinkEmbedder/Link/Basic.pm ( view source; MetaCPAN )
package LinkEmbedder::Link::Basic;
use Mojo::Base 'LinkEmbedder::Link';

use Mojo::JSON;
use Mojo::Util 'trim';

my $PHOTO_RE = qr!\.(?:jpg|png|gif|webp)\b!i;
my $VIDEO_RE = qr!\.(?:mpg|mpeg|mov|mp4|o
elf->SUPER::_learn_from_dom($dom);

  $tmp = $dom->at('script[type="application/ld+json"]');
  $self->_learn_from_json_schema($tmp->text) if $tmp;

  # Bitbucket hack
  $tmp = $dom->at('div.codehilite
earn_from_json_schema {
  my ($self, $json) = @_;
  eval { $json = Mojo::JSON::from_json($json) } unless ref $json eq 'HASH';
  return                                        unless ref $json eq 'HASH'
Mojolicious-Plugin-Model ( A/AV/AVKHOZOV/Mojolicious-Plugin-Model-0.13.tar.gz, AVKHOZOV, 2021; MetaCPAN )
Mojolicious-Plugin-Model/lib/Mojolicious/Plugin/Model.pm ( view source; MetaCPAN )
ay->[0];

    # Or HTTP check
    return $self->app->ua->post($url => json => {user => $name, pass => $pass})
      ->res->tx->json('/result');
  }

  1;

Model Users-Client

  package MyApp::Model::U
LinkEmbedder ( J/JH/JHTHORSEN/LinkEmbedder-1.20.tar.gz, JHTHORSEN, 2021; MetaCPAN )
LinkEmbedder/lib/LinkEmbedder/Link/oEmbed.pm ( view source; MetaCPAN )
r %API = (
  'ted.com'     => 'https://www.ted.com/services/v1/oembed.json',
  'vimeo.com'   => 'https://vimeo.com/api/oembed.json',
  'youtube.com' => 'https://www.youtube.com/oembed',
  'youtu.be'  

  my $api_url = $self->_api_url;
  return $self->_get_p($api_url)->then(sub { $self->_learn_from_json(shift) }) if $api_url;

  $self->error({message => "Unknown oEmbed provider for @{[$self->url]}",
LinkEmbedder ( J/JH/JHTHORSEN/LinkEmbedder-1.20.tar.gz, JHTHORSEN, 2021; MetaCPAN )
LinkEmbedder/lib/LinkEmbedder/Link/Travis.pm ( view source; MetaCPAN )
_from_json(shift) });
}

sub _learn_from_json {
  my ($self, $tx) = @_;
  my $json = $tx->res->json;

  $self->type('rich');

  if (my $description = $json->{message}) {
    $description = "$json->{au
on" if $json->{author_name};
    $self->description($description);
  }

  if ($json->{finished_at}) {
    $self->title(sprintf 'Build %s at %s', $json->{status} ? 'failed' : 'succeeded', $json->{finis
hed_at});
  }
  elsif ($json->{started_at}) {
    $self->title(sprintf 'Started building at %s.', $json->{started_at});
  }
  else {
    $self->title('Build has not been started.');
  }

  return $sel
JSON-Create ( B/BK/BKB/JSON-Create-0.35.tar.gz, BKB, 2021; MetaCPAN )
JSON-Create/bench/bench.pl ( view source; MetaCPAN )
#!/usr/bin/env perl

# Benchmark JSON::Create against JSON::XS.

use warnings;
use strict;
use utf8;
use FindBin '$Bin';
use Time::HiRes;
use Text::Table::Tiny 'generate_table';
use Getopt::Long;

my 
ib '/home/ben/projects/json-create/blib/lib';
use lib '/home/ben/projects/json-create/blib/arch';

# Contenders

use JSON::Create 'create_json';
use JSON::XS ();
use Cpanel::JSON::XS ();

# Number of 
 $count = 100;
    $times = 20;
}

print "Versions used:\n";

my @modules = qw/Cpanel::JSON::XS JSON::Create JSON::XS/;
my @mvp;
for my $module (@modules) {
    my $abbrev = $module;
    $abbrev =~ s/
JSON-Create ( B/BK/BKB/JSON-Create-0.35.tar.gz, BKB, 2021; MetaCPAN )
JSON-Create/Create.xs ( view source; MetaCPAN )
/* XS part of JSON::Create. */

#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ppport.h"

#include <stdint.h>
#include "unicode.h"
#include "qsort-r.c"
#include "json-create-perl.c"
		\
	json_create_status_t jcs;			\
	jcs = x;					\
	if (jcs != json_create_ok) {			\
	    warn ("%s:%d: bad status %d from %s",	\
		  __FILE__, __LINE__, jcs, #x);		\
	}						\
    }

typedef json_cre
ate_t * JSON__Create;

#define JCSET						\
    if (items > 1) {					\
	if ((items - 1) % 2 != 0) {			\
	    warn ("odd number of arguments ignored");	\
	}						\
	else {						\
	    int i;					\
	   
WWW-Correios-CEP ( R/RE/RENTOCRON/WWW-Correios-CEP-1.044.tar.gz, RENTOCRON, 2021; MetaCPAN )
WWW-Correios-CEP/lib/WWW/Correios/CEP.pm ( view source; MetaCPAN )
package WWW::Correios::CEP;
use strict;
use warnings;

use LWP::UserAgent;
use JSON;

our $VERSION = 1.044;

use Encode;
use utf8;

sub new {
    my ( $class, $params ) = @_;

    my $this = {
       
k the outcome of the response

            if ( $res->is_success ) {
                $this->_parseJSON( \@result, $res->content, $as_html_tree );
            }
            else {
                $resu
turn wantarray ? @result : $result[0];
}

sub _parseJSON {
    my ( $this, $address_ref, $json, $as_html_tree ) = @_;

    my $obj = from_json($json);

    for my $p ( @{ $obj->{dados} || [] } ) {

  
API-INSEE-Sirene ( C/CP/CPANLNCSA/API-INSEE-Sirene-4.04.tar.gz, CPANLNCSA, 2021; MetaCPAN )
API-INSEE-Sirene/lib/API/INSEE/Sirene.pm ( view source; MetaCPAN )
package API::INSEE::Sirene;

use strict;
use warnings;

use Carp 'croak';
use JSON;
use HTTP::Request::Common qw/ GET POST /;
use HTTP::Status ':constants';
use List::Util 'any';
use LWP::UserAgent;
u
PI::INSEE::Sirene V$VERSION");
    $self->{'user_agent'}->default_header('Accept' => 'application/json');
}

sub _getToken {
    my $self = shift;

    croak 'Please provide your credentials.' if !def
self->{'user_agent'}->request($request);
    my $json_obj;

    if ($response->content_type =~ m/^application\/json/) {
        $json_obj = decode_json($response->content);
    }
    else {
        re
Pod-POM-Web ( D/DA/DAMI/Pod-POM-Web-1.27.tar.gz, DAMI, 2021; MetaCPAN )
Pod-POM-Web/lib/Pod/POM/Web.pm ( view source; MetaCPAN )
erlfunc entries in JSON format for the DHTML autocompleter
  my @funcs = map {$_->title} grep {$_->content =~ /\S/} $self->perlfunc_items;
  s|[/\s(].*||s foreach @funcs;
  my $json_funcs = "[" . join
(",", map {qq{"$_"}} uniq @funcs) . "]";

  # perlvar entries in JSON format for the DHTML autocompleter
  my @vars = map {$_->title} grep {!/->/} map {@$_} $self->perlvar_items;
  s|\s*X<.*||s foreac
h @vars;
  s|\\|\\\\|g  foreach @vars;
  s|"|\\"|g    foreach @vars;
  my $json_vars = "[" . join(",", map {qq{"$_"}} uniq @vars) . "]";

  # initial sections : perldocs, pragmas and scripts
  my @per

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