Group
Extension

Matches 35358

DTA-CAB ( M/MO/MOOCOW/DTA-CAB-1.115.tar.gz, MOOCOW, 2021; MetaCPAN )
DTA-CAB/CAB/index.pod ( view source; MetaCPAN )
g DTA::CAB::Analyzer::Dict::JsonDB

=item L<DTA::CAB::Analyzer::Cache::Static::BDB|DTA::CAB::Analyzer::Cache::Static::BDB>

Static cache using DTA::CAB::Analyzer::Dict::JsonDB

=item L<DTA::CAB::Analy
AB::Analyzer::Dict::Json|DTA::CAB::Analyzer::Dict::Json>

generic analysis dictionary API using JSON values

=item L<DTA::CAB::Analyzer::Dict::JsonCDB|DTA::CAB::Analyzer::Dict::JsonCDB>

generic analy
sis dictionary API using JSON values

=item L<DTA::CAB::Analyzer::Dict::JsonDB|DTA::CAB::Analyzer::Dict::JsonDB>

generic analysis dictionary API using JSON values

=item L<DTA::CAB::Analyzer::DmootSu
DTA-CAB ( M/MO/MOOCOW/DTA-CAB-1.115.tar.gz, MOOCOW, 2021; MetaCPAN )
DTA-CAB/CAB/WebServiceHowto.pod ( view source; MetaCPAN )
]

Simple machine-readable "vertical" text format based on the L<TT|/TT>
format but using L<JSON|http://json.org/> to encode sentence- and token-level attributes
rather than an explicit attribute labe

"C<%%$TJ:DOC=>I<JSON>", where I<JSON> is a JSON object representing
auxilliary document attributes.
Sentence-attribute lines are analogousd comments of the form
"C<%%$TJ:SENT=>I<JSON>".
Token lines c
onsist of the the token surface text,
followed by a TAB character,
followed by a JSON object representing the internal token structure.

Useful for further script-based processing.

=cut

##==========
Google-ISBNNumbers ( E/EC/ECHERNOF/Google-ISBNNumbers-1.00.tar.gz, ECHERNOF, 2021; MetaCPAN )
Google-ISBNNumbers/lib/Google/ISBNNumbers.pm ( view source; MetaCPAN )
package Google::ISBNNumbers;

use HTTP::Tiny;
use Cpanel::JSON::XS;
use Carp;
use strict;
use warnings;

our $VERSION = "1.00";

sub new {
	my ($class, $google_api_key) = @_;
	
	# the API key is requi
 self, with an HTTP::Tiny and Cpanel::JSON objects
	my $self = bless {
		'api_key' => $google_api_key,
		'http' => HTTP::Tiny->new,
		'json_coder' => Cpanel::JSON::XS->new->utf8->allow_nonref->allow_b
up failed: ".$response->{reason} unless $response->{success};
	
	# translate JSON to data struct
	my $results = $self->{json_coder}->decode( $response->{content} );
	
	# must be an array
	croak "Inval
DTA-CAB ( M/MO/MOOCOW/DTA-CAB-1.115.tar.gz, MOOCOW, 2021; MetaCPAN )
DTA-CAB/CAB/Format.pm ( view source; MetaCPAN )
tDocument($_[1]); }


## $fmt = $fmt->putData($data)
##  + put arbitrary raw data (e.g. for YAML, JSON, XmlPerl)
sub putData {
  $_[0]->logconfess("putData() not implemented!");
}

1; ##-- be happy

_
/format.html>
format, with optional special handling for additional C<MISC> fields, including
C<json=JSON> for embedding L<DTA::CAB::Format::TJ|DTA::CAB::Format::TJ> CAB-token structure.
Registered as
mat::JSON|DTA::CAB::Format::JSON>

Abstract datum parser|formatter for JSON I/O.
Transparently wraps one of the
L<DTA::CAB::Format::JSON::XS|DTA::CAB::Format::JSON::XS>
or
L<DTA::CAB::Format::JSON::Sy
DTA-CAB ( M/MO/MOOCOW/DTA-CAB-1.115.tar.gz, MOOCOW, 2021; MetaCPAN )
DTA-CAB/CAB/Datum.pm ( view source; MetaCPAN )
turn DTA::CAB::Document->new(@_); ##-- default
}


## $thingy = $obj->TO_JSON()
##  + annoying wrapper for JSON::XS
sub TO_JSON {
  return { %{$_[0]} };
}

1; ##-- be happy

__END__

##===============
Mojolicious-Plugin-Minion-Starter ( S/SC/SCESANO/Mojolicious-Plugin-Minion-Starter-0.005.tar.gz, SCESANO, 2021; MetaCPAN )
Mojolicious-Plugin-Minion-Starter/lib/Mojolicious/Plugin/Minion/Starter.pod ( view source; MetaCPAN )
      $c->render('json' => { job => $j });

    };

    get '/state/:id' => sub {
        my $c = shift;
        my $job = $c->minion->job($c->stash('id'));

        $c->render('json' => { job => $c->
Mojo-Response-JSON-Path ( S/SC/SCESANO/Mojo-Response-JSON-Path-0.004.tar.gz, SCESANO, 2021; MetaCPAN )
Mojo-Response-JSON-Path/skunk/weirdo_server.pl ( view source; MetaCPAN )
in/env perl
use Mojolicious::Lite;

plugin 'Config';

get '/' => sub {
    my $c = shift;
    my $json = {
		"entities" => {
			       "Q100148272" => {
						"id" => "Q100148272",
						"sitelinks" =

						"type" => "item"
					       }
			      },
		"success" => 1
	       };

    $c->render(json => $json);
};

app->start;

__DATA__

@@ index.html.ep
% layout 'default';
% title 'Welcome';
<h1>Wel
Mojo-Response-JSON-Path ( S/SC/SCESANO/Mojo-Response-JSON-Path-0.004.tar.gz, SCESANO, 2021; MetaCPAN )
Mojo-Response-JSON-Path/skunk/weirdo_04.pl ( view source; MetaCPAN )
use Mojo::Util qw/dumper/;
use Mojo::Response::JSON::Path;
use Mojo::UserAgent;
use Time::HiRes qw/time/;

$\ = "\n"; $, = "\t";

my $ua = Mojo::UserAgent->new;

my $url = Mojo::URL->new("http://local
;
    my $json = $tx->res->json('$.entities');
    print dumper $json;
}

print time() - $start;

# print dumper $json;

# print dumper $tx->res->json('//title');

# my $u = Weirdo->new($json);

# pri
Mojo-Response-JSON-Path ( S/SC/SCESANO/Mojo-Response-JSON-Path-0.004.tar.gz, SCESANO, 2021; MetaCPAN )
Mojo-Response-JSON-Path/lib/Mojo/Response/JSON/Path.pod ( view source; MetaCPAN )

=head1 Mojo::Response::JSON::Path - use JSON::Path for searching JSON responses

=head2 SYNOPSIS

    use Mojo::Response::JSON::Path;
    use Mojo::UserAgent;

    my $ua = Mojo::UserAgent->new;

   
;

    my $json = $tx->res->json('$.entities');


=head2 DESCRIPTION

This module allows the use of an optional JSON Path expression to extract a specific value from a Mojo::Message via JSON::Path. 

=head2 FUNCTIONS

None

=head2 SEE ALSO

Related modules: L<Mojo::Message>, L<Mojo::JSON::Pointer>, L<JSON::Path>

=head2 AUTHORS

Simone Cesano 

=head2 COPYRIGHT AND LICENSE

This software is copyri
HTTP-Request-Webpush ( E/ES/ESTRELOW/HTTP-Request-Webpush-0.15.tar.gz, ESTRELOW, 2021; MetaCPAN )
HTTP-Request-Webpush/lib/HTTP/Request/Webpush.pm ( view source; MetaCPAN )

use strict 'vars';
use warnings;

our $VERSION='0.15';

use parent 'HTTP::Request';

use JSON;
use Crypt::JWT qw(encode_jwt);
use MIME::Base64 qw( encode_base64url decode_base64url);
use C
ref $subscription eq 'HASH') {
      $agent=$subscription;
   } else {
      eval {$agent=from_json($subscription); };
   }

   croak "Can't process subscription object" unless ($agent);
   cro
ent using the browser's Push API C<PushManager.subscribe()> method. The argument can
be either a JSON string or a previously setup hash reference. The HTTP::Request uri is taken verbatim from the end
DTA-CAB ( M/MO/MOOCOW/DTA-CAB-1.115.tar.gz, MOOCOW, 2021; MetaCPAN )
DTA-CAB/CAB/Analyzer/EqPho/JsonCDB.pm ( view source; MetaCPAN )
alyzer::EqPho::JsonCDB.pm
## Author: Bryan Jurish <moocow@cpan.org>
## Description: dictionary-based equivalence-class expander, phonetic variant

package DTA::CAB::Analyzer::EqPho::JsonCDB;
use DTA::
CAB::Analyzer ':child';
use DTA::CAB::Analyzer::Dict::JsonCDB;
use strict;

##==============================================================================
## Globals
##==============================
================================================

our @ISA = qw(DTA::CAB::Analyzer::Dict::JsonCDB);

##==============================================================================
## Constructors et
Mojolicious-Plugin-WebPush ( E/ET/ETJ/Mojolicious-Plugin-WebPush-0.05.tar.gz, ETJ, 2021; MetaCPAN )
Mojolicious-Plugin-WebPush/lib/Mojolicious/Command/webpush.pm ( view source; MetaCPAN )
mmand::webpush;
use Mojo::Base 'Mojolicious::Command';
use Mojo::JSON qw(encode_json decode_json);
use Crypt::PK::ECC;

my %COMMAND2JSON = (
  create => [ 1 ],
);
my %COMMAND2CB = (
  keygen => \&_key
$cmd};
  $args[$_] = decode_json($args[$_]) for @{ $COMMAND2JSON{$cmd} || [] };
  $cmd .= "_p";
  $self->app->webpush->$cmd(@args)->then(
    sub { print STDOUT encode_json(@_), "\n" },
    sub { prin
SYNOPSIS

  Usage: APPLICATION webpush COMMAND [OPTIONS]

    ./myapp.pl webpush create <USERID> <JSON>
    ./myapp.pl webpush read <USERID>
    ./myapp.pl webpush delete <USERID>
    ./myapp.pl webpu
Pepper ( E/EC/ECHERNOF/Pepper-1.5.tar.gz, ECHERNOF, 2021; MetaCPAN )
Pepper/lib/Pepper/PlackHandler.pm ( view source; MetaCPAN )
!$self->{response};

	my (@vars, $value, @values, $v, $request_body_type, $request_body_content, $json_params, $plack_headers, @plack_uploads, $plack_upload, $uploaded_filename);

	# stash the hostnam
t JSON data structures
	$request_body_type = $self->{request}->content_type;
	$request_body_content = $self->{request}->content;
	if ($request_body_content && $request_body_type eq 'application/json')
 {
		$json_params = $self->{utils}->json_to_perl($request_body_content);
		if (ref($json_params) eq 'HASH') {
			$self->{params} = $json_params;
		}
	}

	# the rest of this is to accept any POST / GET
Pepper ( E/EC/ECHERNOF/Pepper-1.5.tar.gz, ECHERNOF, 2021; MetaCPAN )
Pepper/lib/Pepper/Utilities.pm ( view source; MetaCPAN )
Utilities::VERSION = '1.5';

# for utf8 support with JSON
use utf8;
use Encode qw( encode_utf8 );

# for encoding and decoding JSON
use Cpanel::JSON::XS;

# for logging via logger()
use Path::Tiny;
us
y $self = bless {
		'request' => $$args{request},
		'response' => $$args{response},
		'json_coder' => Cpanel::JSON::XS->new->utf8->allow_nonref->allow_blessed,
		'config_file' => $ENV{HOME}.'/pepper/c
return $self;	
}

### START METHODS FOR GENERATING RESPONSES AND LOGS

# method to deliver html & json out to the client;
# this must be in here to be available even if not in plack mode
sub send_resp
Pepper ( E/EC/ECHERNOF/Pepper-1.5.tar.gz, ECHERNOF, 2021; MetaCPAN )
Pepper/lib/Pepper.pm ( view source; MetaCPAN )
oint_uri = ?
		}, [ $endpoint ] );
		
	# or maybe a JSON file
	} elsif ($self->{config}{url_mappings_file}) {
	
		my $url_mappings = $self->read_json_file( $self->{config}{url_mappings_file} );
		
		$
r = Pepper->new();

The $pepper object provides several conveniences for MySQL/MariaDB databases, JSON
parsing, Template Toolkit, file handling and logging.  In Web/Plack mode, 
$pepper will also incl
/127.0.0.1:5000 (or in your
browser, using your server's hostname:5000). You should receive basic JSON results. 
Modify PepperExample.pm to tweak those results and then restart the Plack service 
to t
Mojolicious-Plugin-WebPush ( E/ET/ETJ/Mojolicious-Plugin-WebPush-0.05.tar.gz, ETJ, 2021; MetaCPAN )
Mojolicious-Plugin-WebPush/lib/Mojolicious/Plugin/WebPush.pm ( view source; MetaCPAN )
ackage Mojolicious::Plugin::WebPush;
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::JSON qw(decode_json encode_json);
use Mojo::URL;
use Crypt::PK::ECC;
use MIME::Base64 qw(encode_base64url decode_ba
ata.json();
  var title = msg.title;
  delete msg.title;
  event.waitUntil(self.registration.showNotification(title, msg));
}
EOF

sub _decode {
  my ($bytes) = @_;
  my $body = eval { decode_json($by
equest") if $@;
  (1, $body);
}

sub _error {
  my ($c, $error) = @_;
  $c->render(status => 500, json => { errors => [ { message => $error } ] });
}

sub _make_route_handler {
  my ($subs_session2use
Pepper ( E/EC/ECHERNOF/Pepper-1.5.tar.gz, ECHERNOF, 2021; MetaCPAN )
Pepper/lib/Pepper/Templates.pm ( view source; MetaCPAN )
rs sent via GET/POST or JSON body are available 
	# within $pepper->{params}
	#
	# Simply return your prepared content and Pepper will deliver
	# it to the client.  To send JSON, return a reference to
epper will send it out to the client
	# sending a data structure back will send that structure in JSON to the client
	# you can alse return HTML or any text 
	
	return $starter_content;

}

1;
];
}

#
evious cookie.
<br/><br/>


<strong>Return JSON:</strong>
<br/><input type="checkbox" name="return_json" value="yes"/>&nbsp;Click to have the response be JSON instead of HTML.
<br/>Leave un-checked to
Mojolicious-Plugin-ServerType ( J/JL/JLCOOPER/Mojolicious-Plugin-ServerType-0.02.tar.gz, JLCOOPER, 2021; MetaCPAN )
Mojolicious-Plugin-ServerType/lib/Mojolicious/Plugin/ServerType.pm ( view source; MetaCPAN )
Lite;

    plugin 'ServerType';

    get '/' => sub {
        my $c = shift;

        $c->render( json => {"serverType" => $c->app->server_type } );
    };

    app->start;

=head1 DESCRIPTION

Mojoli
Pepper ( E/EC/ECHERNOF/Pepper-1.5.tar.gz, ECHERNOF, 2021; MetaCPAN )
Pepper/lib/Pepper/Commander.pm ( view source; MetaCPAN )
pepper set-endpoint'. 
This is a faster option for handling requests, but you may leave blank for JSON config file.}],
		['default_endpoint_module', 
			qq{
Default endpoint-handler Perl module.
This 
s';
	} else {
		$$config{url_mappings_file} = $self->{pepper_directory}.'/config/pepper_endpoints.json';
	}

	# default endpoint handler
	$$config{default_endpoint_module} ||= 'PepperApps::PepperExamp
mappings{$$map[0]} = $$map[1];
		}
		
	# or maybe a JSON file
	} elsif ($utils->{config}{url_mappings_file}) {
	
		$url_mappings = $utils->read_json_file( $utils->{config}{url_mappings_file} );
		
	}	
Amazon-SNS-V4 ( J/JW/JWRIGHT/Amazon-SNS-V4-2.0.tar.gz, JWRIGHT, 2021; MetaCPAN )
Amazon-SNS-V4/lib/Amazon/SNS/V4/Target.pm ( view source; MetaCPAN )
e JSON;

__PACKAGE__->mk_accessors(qw/ sns arn /);

sub Publish
{
	my ($self, $msg, $subj, $attr) = @_;

	# XXX croak on invalid arn

	my $structure = undef;
	my $attributes = undef;

	# support JSON 
payload
	if (ref($msg) eq 'HASH') {

		$structure = 'json';
		$msg = encode_json($msg);
	}

	if (defined($attr) and ref($attr) eq 'HASH') {

		my $i = 1;

		foreach my $key (keys %$attr) {

			$attrib

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