Group
Extension

Matches 35358

Mojolicious-Plugin-Args ( A/AM/AMIRITE/Mojolicious-Plugin-Args-0.05.tar.gz, AMIRITE, 2014; MetaCPAN )
Mojolicious-Plugin-Args/lib/Mojolicious/Plugin/Args.pm ( view source; MetaCPAN )
package Mojolicious::Plugin::Args;
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::JSON 'decode_json';

sub register {
    my ( $self, $app, $opts ) = @_;
    $opts->{ '-want-detail' } //= 0 unless ex
n/json' ) or
             ( $c->req->method eq 'GET' and defined $stash->{format} and $stash->{format} eq 'json' and defined $args{json} ) ) {
            my @args = keys %args;
            my $json =
 decode_json( $c->req->method eq 'GET' ? delete $args{json} : $c->req->body );
            my @json = keys %{ $json };
            do {
                $args{__args}->{ $_ } = $args{ $_ }   for @args;
CHEF-REST-Client ( B/BP/BPATEL/CHEF-REST-Client-1.tar.gz, BPATEL, 2014; MetaCPAN )
CHEF-REST-Client/lib/CHEF/REST.pm ( view source; MetaCPAN )
EF
 push @INC, '/', @base;
};

use parent qw { CHEF CHEF::Header };
use LWP::UserAgent;
use Mojo::JSON;

sub new {
   my $class = shift;
   my $self  = $class->SUPER::new(@_);
   bless $self, $class;
	   );
	return $response;
}

sub post 
{
	my $self  = shift;
	my $param = {@_};
	my $mojo_json = new Mojo::JSON();
	my $response  = $self->add_headers( 
	                    $self->header(
		         
        'Path'    => $param->{'api_end_point'},
		                             'Content' => $mojo_json->encode($param->{'data'})
		                        )->hash
		                      )
		         
WWW-Mechanize-Script ( R/RE/REHSACK/WWW-Mechanize-Script-0.101.tar.gz, REHSACK, 2014; MetaCPAN )
WWW-Mechanize-Script/bin/wtscript2json.pl ( view source; MetaCPAN )
;
use warnings;

# PODNAME: wtscript2json
# ABSTRACT: convert read configuration into JSON

use v5.10.1;

use File::Slurp qw(write_file);
use Getopt::Long;
use JSON ();
use List::MoreUtils qw(zip);
us
opts{"input-files"} }, @{ $opts{"output-files"} } )
  : ();
my %cfg = load_config();

my $coder = JSON->new();
_ARRAY( $cfg{wtscript_extensions} )
  and Config::Any::WTScript->extensions( @{ $cfg{wtsc
t and previous loaded config ...
        my $json = $coder->pretty->encode( $scripts->{ $script_files[0] } );
        write_file( $in2out{$filename}, $json );
    }
    else
    {
        while ( my (
ZimbraManager ( R/RP/RPLESSL/ZimbraManager-0.15.tar.gz, RPLESSL, 2014; MetaCPAN )
ZimbraManager/bin/zimbra-manager-client.pl ( view source; MetaCPAN )
se Getopt::Long qw(:config posix_default no_ignore_case);
use Pod::Usage;

use Mojo::JSON qw(decode_json encode_json);
use Mojo::URL;
use Mojo::UserAgent;
use Mojo::UserAgent::CookieJar;

use Data::Du
     $param->{$k} = $v;
    }
    return $param;
}

#### Zimbra Manager Communication ###

sub getJSONZimbraManager {
    my $function = shift;
    my $params   = shift;
    my $catcherr = shift;
    
n);
    $url->query($params);
    my $req = $ua->get($url);
    return processJSONAnswer($req, $catcherr);

}

sub postJSONZimbraManager {
    my $function = shift;
    my $params   = shift;
    my $c
CHEF-REST-Client ( B/BP/BPATEL/CHEF-REST-Client-1.tar.gz, BPATEL, 2014; MetaCPAN )
CHEF-REST-Client/lib/CHEF/REST/Client/roles.pm ( view source; MetaCPAN )
Client::attributes;

$CHEF::REST::Client::roles::VERSION = 1.0;

# this module will be passed tha json parsed hash 
# under ___data__() or variable.
# process it depending on the content expected.

su
CatalystX-CRUD-Model-RDBO ( K/KA/KARMAN/CatalystX-CRUD-Model-RDBO-0.302.tar.gz, KARMAN, 2014; MetaCPAN )
CatalystX-CRUD-Model-RDBO/lib/CatalystX/CRUD/Object/RDBO.pm ( view source; MetaCPAN )
:CRUD::Object );

# help for serialize()
use Rose::DB::Object::Helpers qw( column_values_as_json );
use JSON;

our $VERSION = '0.302';

=head1 NAME

CatalystX::CRUD::Object::RDBO - Rose::DB::Object im
DateTime
et al objects serialized to strings.

=cut

sub serialize {
    return decode_json( column_values_as_json( shift->delegate ) );
}

1;

__END__

=head1 AUTHOR

Peter Karman, C<< <karman at cpa
WWW-Mechanize-Script ( R/RE/REHSACK/WWW-Mechanize-Script-0.101.tar.gz, REHSACK, 2014; MetaCPAN )
WWW-Mechanize-Script/lib/WWW/Mechanize/Script/Util.pm ( view source; MetaCPAN )

=item -

qw(check_host_app_one)

=item -

qw(check_host/app_one)

=item -

qw(check_host_app_one.json)

=item -

qw(check_host/app_one.yml)

=item -

qw(check_splunk_[1-5])

=item -

qw(splunk/test*)
CHEF-REST-Client ( B/BP/BPATEL/CHEF-REST-Client-1.tar.gz, BPATEL, 2014; MetaCPAN )
CHEF-REST-Client/lib/CHEF/REST/Client/cookbooks.pm ( view source; MetaCPAN )
t all the cookbooks available. 

 $obj->cookbook()->list;

=cut

# this module will be passed tha json parsed hash 
# under ___data__() or variable.
# process it depending on the content expected.

su
MongoDB-Async ( N/NY/NYAKNYAN/MongoDB-Async-0.702.3.tar.gz, NYAKNYAN, 2014; MetaCPAN )
MongoDB-Async/lib/MongoDB/Async/OID.pm ( view source; MetaCPAN )

*to_string = \&value;



sub get_time {
    return hex(substr($_[0]->{value}, 0, 8));
}


sub TO_JSON { {'$oid' => $_[0]->{value}} }

use overload
    '""' => \&to_string,
    'fallback' => 1;


1;

he timestamp.  

=head2 TO_JSON

    my $json = JSON->new;
    $json->allow_blessed;
    $json->convert_blessed;

    $json->encode(MongoDB::Async::OID->new);

Returns a JSON string for this OID.  Thi
s is compatible with the strict JSON
representation used by MongoDB, that is, an OID with the value 
"012345678901234567890123" will be represented as 
C<{"$oid" : "012345678901234567890123"}>.

=head
ZimbraManager ( R/RP/RPLESSL/ZimbraManager-0.15.tar.gz, RPLESSL, 2014; MetaCPAN )
ZimbraManager/lib/ZimbraManager.pm ( view source; MetaCPAN )
ZimbraManager;

use Mojo::Base 'Mojolicious';


use Mojo::Util qw(dumper);
use Mojo::JSON qw(decode_json encode_json);

use ZimbraManager::SOAP;
use ZimbraManager::SOAP::Friendly;

use HTTP::CookieJar
    $ctrl->render(text => "<pre>$text</pre>") if ($plain);
    }
    else {
        $ctrl->render(json => $text);
    }
};


my $buildAuthRequest = sub {
     my $user = shift;
     my $password = shi
g
    $r->post('/auth' => sub {
        my $ctrl        = shift;
        my $perl_args   = decode_json($ctrl->req->body);
        my $user        = $perl_args->{'user'};
        my $password    = $per
Dist-Zilla-Plugin-ContributorsFromPod ( R/RK/RKITOVER/Dist-Zilla-Plugin-ContributorsFromPod-0.01.tar.gz, RKITOVER, 2014; MetaCPAN )
Dist-Zilla-Plugin-ContributorsFromPod/lib/Dist/Zilla/Plugin/ContributorsFromPod.pm ( view source; MetaCPAN )
ection in your main file in your distribution, this L<Dist::Zilla>
plugin will populate your META.json x_contributors list from it.

The format should be:

  Some Name <some@email.com>

nicknames are 
CHEF-REST-Client ( B/BP/BPATEL/CHEF-REST-Client-1.tar.gz, BPATEL, 2014; MetaCPAN )
CHEF-REST-Client/lib/CHEF/REST/Client/EndPoints.pm ( view source; MetaCPAN )
irname(__FILE__) ) ) );
 pop @base; #REST
 pop @base; #CHEF
 push @INC, '/', @base;
};

use Mojo::JSON;

sub new {
  my $class  = shift;
  my $param  = {@_};
  my $self   = {};
  bless $self, $class;
b ___data___
{
	my $self = shift;
	my $result = shift;
	my $mojo_json = new Mojo::JSON();
	   $self->{'___data___'} = 
	   		$mojo_json->decode( $result )  
     						if defined $result;
     						
Farabi ( A/AZ/AZAWAWI/Farabi-0.47.tar.gz, AZAWAWI, 2014; MetaCPAN )
Farabi/lib/Farabi/Editor.pm ( view source; MetaCPAN )
=> $violation->explanation,
			diagnostics => $violation->diagnostics,
		  };
	}

	$self->render( json => \@results );
}

sub _capture_cmd_output {
	my $self   = shift;
	my $cmd    = shift;
	my $opts 
aram('input');

	my $o = $self->_capture_cmd_output( $^X, [], $source, $input );

	$self->render( json => $o );
}

sub run_perlbrew_exec {
	my $self   = shift;
	my $source = $self->param('source');
	m
$self->_capture_cmd_output( 'perlbrew', [ 'exec', 'perl' ],
		$source, $input );

	$self->render( json => $o );
}

# Taken from Padre::Plugin::PerlTidy
# TODO document it in 'SEE ALSO' POD section
sub
Eve ( Z/ZI/ZINIGOR/Eve-0.06.tar.gz, ZINIGOR, 2014; MetaCPAN )
Eve/lib/Eve/HttpResourceGraphTestBase.pm ( view source; MetaCPAN )
ode => $code);
        $expected_response->set_body(
            text => $self->{'registry'}->get_json()->encode(
                reference => $body));

        is(
            $response->get_text(),
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/JSONify.pm ( view source; MetaCPAN )
package Exobrain::JSONify;
use Moose::Role;
use Storable qw(dclone);
use Data::Structure::Util qw(unbless);

# Basic role that allows converting self object into JSON.
# Really we should use MooseX::S


sub TO_JSON {
    my ($self) = @_;

    return unbless dclone $self;   # Yuck!
}


1;

__END__

=pod

=head1 NAME

Exobrain::JSONify

=head1 VERSION

version 1.08

=for Pod::Coverage TO_JSON

=head1
Eve ( Z/ZI/ZINIGOR/Eve-0.06.tar.gz, ZINIGOR, 2014; MetaCPAN )
Eve/lib/Eve/HttpRequest/Psgi.pm ( view source; MetaCPAN )
st::Psgi;

use parent qw(Eve::HttpRequest);

use strict;
use warnings;

use Hash::MultiValue;
use JSON::XS;
use Plack::Request;

=head1 NAME

B<Eve::HttpRequest::Psgi> - an HTTP request adapter for th
t_type() eq 'application/json') {
        $self->_body_parameters = Hash::MultiValue->new(
            %{$self->cgi->query_parameters()->as_hashref_mixed()},
            %{JSON::XS->new()->utf8()->dec
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Message.pm ( view source; MetaCPAN )
Constraints;
use Carp;
use ZMQ::Constants qw(ZMQ_SNDMORE);
use ZMQ;
use JSON::Any;
use Data::Dumper;

use Exobrain::Types qw(JSON);

# ABSTRACT: Top-level role for all exobrain messages
our $VERSION =
# data.

requires qw(summary);

# TODO: We should use JSON::XS, because we need specialised features
#       for handling objects.

my $json = JSON::Any->new( convert_blessed => 1 );

# We define a du
s;

    push(@frames, join("_", "EXOBRAIN", $self->namespace, $self->source));
    push(@frames, $json->encode( {
        timestamp => $self->timestamp,
        roles     => $self->roles,
        # TO
ZMQ-Declare ( S/SM/SMUELLER/ZMQ-Declare-0.03.tar.gz, SMUELLER, 2014; MetaCPAN )
ZMQ-Declare/lib/ZMQ/Declare/ZDCF/Encoder/DumpEval.pm ( view source; MetaCPAN )
::Declare::ZDCF::Encoder>.

Implements an encoder/decoder using Data::Dumper and eval.
Prefer the JSON encoder unless you have no choice -- this one can execute
arbitrary input code thanks to the eval
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Agent.pm ( view source; MetaCPAN )
f->component );
}


has json => (
    is => 'ro',
    lazy => 1,
    builder => '_build_json',
);

method _build_json() {
    eval "use JSON::Any; 1;" or die $@;
    return JSON::Any->new;
}

1;

__EN
<Exobrain::Cache> object, with a namespace of
C<$self->component>.

=head2 json

    my $json = $self->json;

Returns a L<JSON::Any> object.

=head1 AUTHOR

Paul Fenwick <pjf@cpan.org>

=head1 COPYRIG
ZMQ-Declare ( S/SM/SMUELLER/ZMQ-Declare-0.03.tar.gz, SMUELLER, 2014; MetaCPAN )
ZMQ-Declare/lib/ZMQ/Declare/ZDCF/Encoder/Storable.pm ( view source; MetaCPAN )
N

Inherits from 
L<ZMQ::Declare::ZDCF::Encoder>.

Implements a Storable encoder/decoder. Use the JSON encoder instead unless
you absolutely require Storable.

=head1 SEE ALSO

The ZDCF RFC L<http://r
rg/spec:5>

L<ZMQ::Declare::ZDCF>

L<ZMQ::Declare::ZDCF::Encoder>,
L<ZMQ::Declare::ZDCF::Encoder::JSON>

L<ZeroMQ>

=head1 AUTHOR

Steffen Mueller E<lt>smueller@cpan.orgE<gt>

=head1 COPYRIGHT AND LIC

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