Group
Extension

Matches 35358

JavaScript-Any ( T/TO/TOBYINK/JavaScript-Any-0.002.tar.gz, TOBYINK, 2017; MetaCPAN )
JavaScript-Any/lib/JavaScript/Any/Context.pm ( view source; MetaCPAN )
eturn !!1 if is_plain_scalarref($value) && $$value == 1;
	require JSON::PP;
	return !!1 if JSON::PP::is_bool($value) && $value == JSON::PP::true();
	return !!0;
}

sub is_false {
	shift;
	my ($value) 
eturn !!1 if is_plain_scalarref($value) && $$value == 0;
	require JSON::PP;
	return !!1 if JSON::PP::is_bool($value) && $value == JSON::PP::false();
	return !!0;
}

sub is_null {
	return !defined $_[1
Net-SolarWinds-REST ( A/AK/AKALINUX/Net-SolarWinds-REST-1.22.tar.gz, AKALINUX, 2017; MetaCPAN )
Net-SolarWinds-REST/lib/Net/SolarWinds/REST.pm ( view source; MetaCPAN )
:SSL;
use LWP::UserAgent;
use HTTP::Request;
use MIME::Base64 qw();
use Net::SolarWinds::Log;
use JSON qw();
use URI::Encode qw(uri_encode);
use POSIX qw(strftime);

our $VERSION="1.22";

use base qw(
:JSON

This is a JSON object with the following options endabled: JSON->new->allow_nonref->utf8

=cut

# Global JSON OBJECT
our $JSON=JSON->new->allow_nonref->utf8;

=item * my $json=$class->get_json;


Returns the class level JSON object.

=cut

sub get_json { return $JSON; }

=item * $Net::SolarWinds::REST::UA

This is a LWP::UserAgent used to talk to CPM servers

=cut

# Global UA object
our $UA
SyntaxHighlight-Any ( P/PE/PERLANCAR/SyntaxHighlight-Any-0.07.tar.gz, PERLANCAR, 2017; MetaCPAN )
SyntaxHighlight-Any/lib/SyntaxHighlight/Any.pm ( view source; MetaCPAN )
 => {pygments => 'yaml'},
    perl       => {pygments => 'perl', sh => 'perl'},
    json       => {pygments => 'json', sh => 'js'  },
    js         => {pygments => 'js'  , sh => 'js'  },
    php     
1 SEE ALSO

For syntax-highlighting (as well as encoding/formatting) to JSON, there's
L<JSON::Color> or L<Syntax::Highlight::JSON> (despite the module name, the
latter is an encoder, not strictly a st
rl.org/dist/Syntax-Highlight-Engine-Kate>),
L<Syntax::Highlight::JSON>
(L<reviews|http://cpanratings.perl.org/dist/Syntax-Highlight-JSON>),
L<Syntax::Highlight::Engine::Simple>
(L<reviews|http://cpanr
Dancer2-Plugin-REST ( Y/YA/YANICK/Dancer2-Plugin-REST-1.02.tar.gz, YANICK, 2017; MetaCPAN )
Dancer2-Plugin-REST/lib/Dancer2/Plugin/REST.pm ( view source; MetaCPAN )
rep /;

my %content_types = (
    yaml => 'text/x-yaml',
    yml  => 'text/x-yaml',
    json => 'application/json',
    dump => 'text/x-data-dumper',
    ''   => 'text/html',
);

# TODO check if we us
\w+)} => sub {
        User->find(captures->{id});
    };

    # curl http://mywebservice/user/42.json
    { "id": 42, "name": "John Foo", email: "john.foo@example.com"}

    # curl http://mywebservic
*> serializer. Unless overriden in the 
configuration, it defaults to:

    serializers:
      json: JSON
      yml:  YAML
      dump: Dumper

=head1 KEYWORDS

=head2 prepare_serializer_for_format

Wh
Plack-App-dbi2http ( P/PE/PERLANCAR/Plack-App-dbi2http-0.07.tar.gz, PERLANCAR, 2017; MetaCPAN )
Plack-App-dbi2http/lib/Plack/App/dbi2http.pm ( view source; MetaCPAN )
e
 eng_name
 tags

 % curl 'http://localhost:5000/list_columns?table=countries&detail=1&-riap-fmt=json-pretty'
 [
    200,
   "OK",
   [
      {
         "pos" : 1,
         "name" : "id",
         "t
  http://localhost:5000/api/list_tables
 * Function arguments can be given via GET/POST params or JSON hash in req body
 * To find out which arguments a function supports, try:
     http://localhost:5
data, use the C<-riap-fmt>
special argument:

 % curl http://localhost:5000/list_tables?-riap-fmt=json-pretty
 [
   200,
   "OK",
   [
      "\"main\".\"continents\"",
      "\"main\".\"countries\"",
Yote-Server ( C/CA/CANID/Yote-Server-1.27.tar.gz, CANID, 2017; MetaCPAN )
Yote-Server/lib/Yote/Server/ModperlOperator.pm ( view source; MetaCPAN )
w(:common);

use Data::Dumper;
use Text::Xslate qw(mark_raw);
use Encode;
use HTML::Entities;
use JSON;
use URI::Escape;

use Yote::Server;

sub new {
    my( $pkg, %options ) = @_;

    #
    # Setup


sub handle_json_request {
    my( $self, $req ) = @_;

    my $json_payload = uri_unescape(scalar($req->param('p')));

    my $in_json = decode_json( $json_payload );

    my( $out_json, @uploads );
      $out_json = $self->{server}->invoke_payload( $json_payload, \@uploads );
    };
    if( $@ ) {
        my $err = ref $@ ? $@ : { err => "INTERNAL ERROR" };
        $out_json = to_json( $err );
 
Aniki ( K/KA/KARUPA/Aniki-1.06.tar.gz, KARUPA, 2017; MetaCPAN )
Aniki/lib/Aniki.pm ( view source; MetaCPAN )
ict mode, override it and return false value.

SEE ALSO: L<The JSON SQL Injection Vulnerability|http://blog.kazuhooku.com/2014/07/the-json-sql-injection-vulnerability.html>

=head3 C<preload_all_row_c
Finance-Bank-ID-BPRKS ( P/PE/PERLANCAR/Finance-Bank-ID-BPRKS-0.06.tar.gz, PERLANCAR, 2017; MetaCPAN )
Finance-Bank-ID-BPRKS/lib/Finance/Bank/ID/BPRKS.pm ( view source; MetaCPAN )
teTime->dmy . ' ' .
DateTime->hms). This is to make it easy to pass the data structure into YAML,
JSON, MySQL, etc. Nevertheless, internally DateTime objects are still used.

=back

Additional notes:
HTML-FormHandler ( G/GS/GSHANK/HTML-FormHandler-0.40068.tar.gz, GSHANK, 2017; MetaCPAN )
HTML-FormHandler/lib/HTML/FormHandler/Render/RepeatableJs.pm ( view source; MetaCPAN )
t
$HTML::FormHandler::Render::RepeatableJs::VERSION = '0.40068';
use Moose::Role;

use JSON::MaybeXS ('encode_json');


sub render_repeatable_js {
    my $self = shift;
    return '' unless $self->has
_js->{$key}->{level};
    }
    my $index_str = encode_json( \%index );
    my $html_str = encode_json( \%html );
    my $level_str = encode_json( \%level );
    my $js = <<EOS;
<script>
\$(document).
Data-Sah-Format ( P/PE/PERLANCAR/Data-Sah-Format-0.003.tar.gz, PERLANCAR, 2017; MetaCPAN )
Data-Sah-Format/lib/Data/Sah/FormatJS.pm ( view source; MetaCPAN )
 {
        require File::Temp;
        require JSON::MaybeXS;
        #require String::ShellQuote;

        my $data = shift;

        state $json = JSON::MaybeXS->new->allow_nonref;

        # code t
js
        my $src = "var formatter = $code;\n\n".
            "console.log(JSON.stringify(formatter(".
                $json->encode($data).")))";

        my ($jsh, $jsfn) = File::Temp::tempfile();
file $jsfn: $!";

        my $out = IPC::System::Options::readpipe($nodejs_path, $jsfn);
        $json->decode($out);
    };
}

1;
# ABSTRACT: Generate formatter code

__END__

=pod

=encoding UTF-8

Net-SolarWinds-REST ( A/AK/AKALINUX/Net-SolarWinds-REST-1.22.tar.gz, AKALINUX, 2017; MetaCPAN )
Net-SolarWinds-REST/lib/Net/SolarWinds/REST/Batch.pm ( view source; MetaCPAN )
t->get_data;
  my $node_id=$node->{NodeID};

  return $self->UpdateNodeProps($node_id,UnManaged=>&JSON::true);
}

=item * my $result=$self->get_management_config($thing);

Programatic way build a refr
mes,
    custom_properties=>$custom_props,
    templates=>$templates,
  };

  $config->{replace}=&JSON::false;
  return $self->RESULT_CLASS->new_true($config);
}

=item * my $result=$self->get_poller_
WWW-Wikipedia-LangTitles ( B/BK/BKB/WWW-Wikipedia-LangTitles-0.04.tar.gz, BKB, 2017; MetaCPAN )
WWW-Wikipedia-LangTitles/lib/WWW/Wikipedia/LangTitles.pod ( view source; MetaCPAN )
elium');

Make a URL for the Wikidata page. You will then need to retrieve the
page and parse the JSON yourself. Use a second argument to specify the
language of the page:

    
    use utf8;
    use 
%B8%AE%E0%B8%B5%E0%B9%80%E0%B8%A5%E0%B8%B5%E0%B8%A2%E0%B8%A1&props=sitelinks/urls|datatype&format=json


(This example is included as L<F<thai-url.pl>|https://fastapi.metacpan.org/source/BKB/WWW-Wikip
ent

L<LWP::UserAgent> is used to retrieve the data from Wikidata.

=item JSON::Parse

L<JSON::Parse> is used to parse the JSON data from Wikidata.

=item URI::Escape

L<URI::Escape> is used to make t
Dist-Zilla-Plugin-Depak ( P/PE/PERLANCAR/Dist-Zilla-Plugin-Depak-0.21.tar.gz, PERLANCAR, 2017; MetaCPAN )
Dist-Zilla-Plugin-Depak/lib/Dist/Zilla/Plugin/Depak.pm ( view source; MetaCPAN )
);
use File::Temp qw(tempfile tempdir);
use File::Which;
use IPC::System::Options qw(system);
use JSON::MaybeXS;
use List::Util qw(first);

use Moose;
with (
    'Dist::Zilla::Role::FileFinderUser' =>

    $self->write_modules_to_dir;
    my $mods_tempdir = $self->written_modules_dir;

    # the --json output is so that we can read the list of included modules
    my @depak_cmd = (
        "depak",
  "--include-dir", $mods_tempdir,
        "-i", $source, "-o", $target, "--overwrite",
        "--json",
    );

    if (-f "depak.conf") {
        push @depak_cmd, (
            "--config-profile", $
WWW-Wikipedia-LangTitles ( B/BK/BKB/WWW-Wikipedia-LangTitles-0.04.tar.gz, BKB, 2017; MetaCPAN )
WWW-Wikipedia-LangTitles/lib/WWW/Wikipedia/LangTitles.pm ( view source; MetaCPAN )
K,
);
our $VERSION = '0.04';

use LWP::UserAgent;
use URI::Escape 'uri_escape_utf8';
use JSON::Parse 'parse_json';

sub make_wiki_url
{
    my ($name, $lang) = @_;
    if (! $lang) {
	# Defaults to En
w/api.php?action=wbgetentities&sites=$lang&titles=$safe_name&props=sitelinks/urls|datatype&format=json";
    return $url;
}

sub get_wiki_titles
{
    my ($name, %options) = @_;
    my $lang = $option
	print "$name data was retrieved successfully.\n";
    }
    my $json = $response->decoded_content ();
    my $data = parse_json ($json);
    my $array = $data->{entities};
    my %lang2title;
    for
Net-Prober ( C/CO/COSIMO/Net-Prober-0.17.tar.gz, COSIMO, 2017; MetaCPAN )
Net-Prober/lib/Net/Prober.pm ( view source; MetaCPAN )
e, to be able to specify
the probe arguments as JSON. This is inspired by
the Varnish probe config block:

    # This is my config file.
    # It's JSON presumably...

    "backends": {
        "1.2.3
Perinci-Access ( P/PE/PERLANCAR/Perinci-Access-0.45.tar.gz, PERLANCAR, 2017; MetaCPAN )
Perinci-Access/lib/Perinci/Access/Manual/Examples.pod ( view source; MetaCPAN )
Pipe)

=head2 (Client) (Socket)

=head2 (Client) (Server) Dealing with binary data

The choice as JSON as the network transport protocol (because it is the lowest
common denominator across languages l
this function via Riap in-process, there's nothing to worry about
since there is no round-trip to JSON. You can just:

 my $res = Perinci::Access->new->request(call => "/MyLib/gzip",
                 
=>{data=>"some data"}});

If you are using this function over HTTP or oher network protocol where JSON is
involved, you will need to encode the argument:

 use MIME::Base64;
 my $res = Perinci::Access
WebService-CastleIO ( D/DS/DSIMONE/WebService-CastleIO-1.03.tar.gz, DSIMONE, 2017; MetaCPAN )
WebService-CastleIO/lib/WebService/CastleIO.pm ( view source; MetaCPAN )
e::CastleIO;

use 5.10.0;
use strict;
use warnings;
use feature 'switch';
use feature 'say';

use JSON;
use REST::Client;
use MIME::Base64;

use Moose;
use Moose::Util::TypeConstraints;
use MooseX::Pa
/api.castle.io/v1'
);

has format => (
  is        => 'ro',
  isa       => 'Str',
  default   => 'json'
);

has cookie_id => (
  is        => 'rw',
  isa       => 'Str'
);

has ip_address => (
  is   
Vjnn',
        cookie_id  => 'abcd',
        ip_address => '24.61.128.172',
        headers    => JSON->new->allow_nonref->utf8->encode({'User-Agent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.
Yote-Server ( C/CA/CANID/Yote-Server-1.27.tar.gz, CANID, 2017; MetaCPAN )
Yote-Server/lib/Yote/Server.pm ( view source; MetaCPAN )
alized';
no warnings 'numeric';

use Lock::Server;
use Yote;

use bytes;
use IO::Socket::SSL;
use JSON;
use Time::HiRes qw(time);
use URI::Escape;
use UUID::Tiny;


use vars qw($VERSION);

$VERSION = 
       $sock->close;
            exit;
        }
        

        # data has the input parmas in JSON format.
        # POST /

        if ( $verb ne 'POST' ) {
            $sock->print( "HTTP/1.1 40
p=//;
        my $out_json;
        eval {
            $out_json = $self->invoke_payload( $data );
        };

        if( ref $@ eq 'HASH' ) {
            $out_json = encode_json( $@ );
        } 
  
Yote-Server ( C/CA/CANID/Yote-Server-1.27.tar.gz, CANID, 2017; MetaCPAN )
Yote-Server/cgi-bin/yote_cgi.pl ( view source; MetaCPAN )
Base/lib';

use Yote;
use Yote::Server;

use CGI;
use DateTime;
use Data::Dumper;
use Encode;
use JSON;
use URI::Escape;

sub _log {
    my( $msg ) = @_;
    open my $out, ">>/opt/yote/log/yote.log";
re_locker;

}
my $cgi = CGI->new;

# check if a file upload
my $json_payload = uri_unescape(scalar($cgi->param('p')));
_log( "IN : '$json_payload'" );
my $uploads = $cgi->param('f');
my( @uploads );
i
e FILE;

    }
}

my $out_json;
eval {
    $out_json = $main::yote_server->invoke_payload( $json_payload, \@uploads );
};

if( ref $@ eq 'HASH' ) {
    $out_json = encode_json( $@ );
    undef $@;
} e
Bencher-Scenarios-LogAny ( P/PE/PERLANCAR/Bencher-Scenarios-LogAny-0.09.tar.gz, PERLANCAR, 2017; MetaCPAN )
Bencher-Scenarios-LogAny/lib/Bencher/Scenario/LogAny/NullLogging.pm ( view source; MetaCPAN )
 Linux version 3.16.0-4-amd64 >>.

Benchmark with C<< bencher -m LogAny::NullLogging --env-hashes-json '[{"PERL5OPT":"-Iarchive/Log-Any-1.040/lib"},{"PERL5OPT":"-Iarchive/Log-Any-1.041/lib"}]' >>:

 #

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