Group
Extension

Matches 35359

HTML-Widgets-NavMenu-ToJSON ( S/SH/SHLOMIF/HTML-Widgets-NavMenu-ToJSON-v0.0.1.tar.gz, SHLOMIF, 2012; MetaCPAN )
HTML-Widgets-NavMenu-ToJSON/lib/HTML/Widgets/NavMenu/ToJSON.pm ( view source; MetaCPAN )
enu::ToJSON;

use 5.008;
use strict;
use warnings FATAL => 'all';

use Carp;

use parent 'HTML::Widgets::NavMenu::Object';

use JSON qw(encode_json);

=head1 NAME

HTML::Widgets::NavMenu::ToJSON - con
idgets::NavMenu to JSON

=head1 VERSION

Version 0.0.1

=cut

our $VERSION = '0.0.1';

=head1 SYNOPSIS

    use HTML::Widgets::NavMenu::ToJSON;
    use HTML::Widgets::NavMenu::ToJSON::Data_Persistence
avMenu::ToJSON::Data_Persistence::YAML->new(
            {
                filename => '/path/to/persistence_data.yaml',
            }
        );

    my $obj = HTML::Widgets::NavMenu::ToJSON->new(
  
Plack-App-Prack ( L/LE/LEEDO/Plack-App-Prack-0.02.tar.gz, LEEDO, 2012; MetaCPAN )
Plack-App-Prack/lib/Plack/App/Prack.pm ( view source; MetaCPAN )
PTION

This app will fork a ruby process that can handle rack requests.
Requests are converted to JSON and sent over a unix socket as a
netstring, a response is then read and used as the psgi response
Mojolicious-Plugin-KossyValidator ( F/FU/FUKAI/Mojolicious-Plugin-KossyValidator-0.04.tar.gz, FUKAI, 2012; MetaCPAN )
Mojolicious-Plugin-KossyValidator/lib/Mojolicious/Plugin/KossyValidator.pm ( view source; MetaCPAN )
 => '无',
                rule    => [], 
            },  
        ]); 
    
        $c->render( json => {
            result => 'false',
            messages => $result->errors
        }) if $result
Clustericious ( B/BD/BDUGGAN/Clustericious-0.9909.tar.gz, PLICEASE, 2012; MetaCPAN )
Clustericious/lib/Clustericious/Config/Helpers.pm ( view source; MetaCPAN )
Merge qw/merge/;
use Data::Dumper;
use Carp qw( croak );
use base qw( Exporter );
use JSON::MaybeXS qw( encode_json );
use Clustericious::Config;

# ABSTRACT: Helpers for clustericious config files.
o
r @mergeStack;
our @EXPORT = qw( extends_config get_password home file dir hostname hostname_full json yaml address public_address interface );


sub extends_config
{
  my($name, @args) = @_;
  push @
;
}


sub hostname_full
{
  require Sys::Hostname;
  Sys::Hostname::hostname();
}


sub json ($)
{
  encode_json($_[0]);
}


sub yaml ($)
{
  require YAML::XS;
  local $YAML::UseHeader = 0;
  my $str 
Plack-App-Prack ( L/LE/LEEDO/Plack-App-Prack-0.02.tar.gz, LEEDO, 2012; MetaCPAN )
Plack-App-Prack/lib/Plack/App/Prack/Response.pm ( view source; MetaCPAN )
package Plack::App::Prack::Response;

use strict;
use warnings;

use JSON;

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

  die "socket is required" unless $sock;

  my $self = bless { sock => $sock }, $class
de_json $self->read_ns;
  $self->{body} = [];

  while (my $chunk = $self->read_ns) {
    push @{$self->{body}}, $chunk;
  }
  
  $self->{sock}->shutdown(0);
}

sub handle_error {
  my ($self, $json) 
= @_;
  my $stack = decode_json $json;
  die join "\n", map {$stack->{$_}} qw/name message stack/;
}

sub headers {
  my $self = shift;
  if ($self->{headers}) {
    return [ %{$self->{headers}} ];
  
Clustericious ( B/BD/BDUGGAN/Clustericious-0.9909.tar.gz, PLICEASE, 2012; MetaCPAN )
Clustericious/lib/Clustericious/Config.pm ( view source; MetaCPAN )
alled" } = $sub };
  $sub->($self);
}


package Clustericious::Config::Callback;

use JSON::MaybeXS qw( encode_json );

sub new
{
  my($class, @args) = @_;
  bless [@args], $class;
}

sub args { @{ sh


sub execute { '' }

sub to_yaml
{
  my($self) = @_;
  "!!perl/array:@{[ ref $self ]} @{[ encode_json [@$self] ]}";
}

package Clustericious::Config::Callback::Password;

use base qw( Clustericious::
=head1 DESCRIPTION

Clustericious::Config reads configuration files which are Mojo::Template's
of JSON or YAML files.  There should generally be an entry for
'url', which may be used by either a clien
Plack-App-Prack ( L/LE/LEEDO/Plack-App-Prack-0.02.tar.gz, LEEDO, 2012; MetaCPAN )
Plack-App-Prack/lib/Plack/App/Prack/Request.pm ( view source; MetaCPAN )
package Plack::App::Prack::Request;

use strict;
use warnings;

use JSON;
use Plack::App::Prack::Response;

my @ENV_KEYS = qw/REQUEST_METHOD PATH_INFO QUERY_STRING 
                  SERVER_NAME SERVE
ift;
  return length($data).":".$data.",";
}

sub write {
  my $self = shift;

  my $env = encode_json($self->_filter_env($self->{env}));

  my $input = "";
  my $buf = "";

  while ($self->{env}->{'p
Plack-App-Prack ( L/LE/LEEDO/Plack-App-Prack-0.02.tar.gz, LEEDO, 2012; MetaCPAN )
Plack-App-Prack/lib/Plack/App/Prack/Worker.pm ( view source; MetaCPAN )
ck::App::Prack::Worker;

use strict;
use warnings;

use Time::HiRes;
use File::Temp ':POSIX';
use JSON;
use IO::Socket::UNIX;
use Plack::App::Prack::Request;

my $NACK = 'Nack::Server.run(ARGV[0], :fi
= $sock->getline;

    # could be a stack trace
    if ($p !~ /^\d+$/) {
      my $stack = decode_json $p;
      die "$stack->{name}: $stack->{message}";
    }

    $self->{sock} = $sock;
    $self->{
Clustericious ( B/BD/BDUGGAN/Clustericious-0.9909.tar.gz, PLICEASE, 2012; MetaCPAN )
Clustericious/lib/Clustericious/Client.pm ( view source; MetaCPAN )
ute;
use MojoX::Log::Log4perl;
use Log::Log4perl qw/:easy/;
use File::Temp;
use JSON::MaybeXS qw( encode_json decode_json );
use Carp qw( carp );
use Mojo::Util qw( monkey_patch );

# ABSTRACT: Constr
$meta && $meta->get("skip_existing");
            $body = encode_json $arg;
            $headers = { 'Content-Type' => 'application/json' };
        } elsif (ref $arg eq 'CODE') {
            $cb = $s
    ||= 'application/json';

    if($body && ref $body eq 'HASH' || ref $body eq 'ARRAY')
    {
        $headers->{'Content-Type'} = 'application/json';
        $body = encode_json $body;
    }

    r
Clustericious ( B/BD/BDUGGAN/Clustericious-0.9909.tar.gz, PLICEASE, 2012; MetaCPAN )
Clustericious/lib/Test/Clustericious/Config.pm ( view source; MetaCPAN )
ocalhost:1234' }];

YAML:

 create_config_ok 'Foo', <<EOF;
 ---
 url: http://localhost:1234
 EOF

JSON:

 create_config_ok 'Foo', <<EOF;
 {"url":"http://localhost:1234"}
 EOF

In addition to being a t
Data-Riak-Fast ( M/MY/MYFINDER/Data-Riak-Fast-0.03.tar.gz, MYFINDER, 2012; MetaCPAN )
Data-Riak-Fast/lib/Data/Riak/Fast/MapReduce.pm ( view source; MetaCPAN )
:Riak::Fast::MapReduce::Phase::Map;
use Data::Riak::Fast::MapReduce::Phase::Reduce;

use JSON::XS qw/encode_json/;

with 'Data::Riak::Fast::Role::HasRiak';

=head1 DESCRIPTION

A map/reduce query.

=h
riak->send_request({
        content_type => 'application/json',
        method => 'POST',
        uri => 'mapred',
        data => encode_json({
            inputs => $self->inputs,
            query
Data-Riak-Fast ( M/MY/MYFINDER/Data-Riak-Fast-0.03.tar.gz, MYFINDER, 2012; MetaCPAN )
Data-Riak-Fast/lib/Data/Riak/Fast/MapReduce/Phase/Link.pm ( view source; MetaCPAN )
package Data::Riak::Fast::MapReduce::Phase::Link;
use Mouse;

use JSON::XS ();

# ABSTRACT: Link phase of a MapReduce

with ('Data::Riak::Fast::MapReduce::Phase');

=head1 DESCRIPTION

A map/reduce li

sub pack {
    my $self = shift;

    my $href = {};

    $href->{keep} = $self->keep ? JSON::XS::true() : JSON::XS::false() if $self->has_keep;
    $href->{bucket} = $self->bucket if $self->has_buck
App-MP4Meta ( A/AR/ARJONES/App-MP4Meta-1.130020.tar.gz, ARJONES, 2013; MetaCPAN )
App-MP4Meta/lib/App/MP4Meta/Source/OMDB.pm ( view source; MetaCPAN )
();

use constant NAME     => 'OMDB';
use constant PLOT     => 'short';
use constant RESPONSE => 'json';

sub new {
    my $class = shift;
    my $args  = shift;
    my $self  = $class->SUPER::new($ar
Data-Riak-Fast ( M/MY/MYFINDER/Data-Riak-Fast-0.03.tar.gz, MYFINDER, 2012; MetaCPAN )
Data-Riak-Fast/lib/Data/Riak/Fast.pm ( view source; MetaCPAN )
package Data::Riak::Fast;

use Mouse;

use JSON::XS qw/decode_json/;
use URI;

use Data::Riak::Fast::Result;
use Data::Riak::Fast::ResultSet;
use Data::Riak::Fast::Bucket;
use Data::Riak::Fast::MapRed
@parts
            ],
        }
    );
}

sub _buckets {
    my $self = shift;

    return decode_json(
        $self->send_request({
            method => 'GET',
            uri => '/buckets',
      
,
            uri => $request_str
    });
}

sub stats {
    my $self = shift;

    return decode_json(
        $self->send_request({
            method => 'GET',
            uri => '/stats',
        
Array-PseudoScalar ( D/DA/DAMI/Array-PseudoScalar-1.02.tar.gz, DAMI, 2012; MetaCPAN )
Array-PseudoScalar/lib/Array/PseudoScalar.pm ( view source; MetaCPAN )
all other operators will be derived from '""'
  ;

# be treated like an plain array by JSON::to_json()
sub TO_JSON  {my $self = shift; return [@$self]}

# additional methods for Template Toolkit, if p
EACH %]

=head2 Interaction with JSON

Likewise, L<JSON/to_json> only exports objects who possess a C<TO_JSON()>
method; so such a method is also implemented here. JSON is really
reluctant to emit any
additional calls are
needed to make it work :

  my $converter = JSON->new->allow_blessed->convert_blessed;
  print $converter->to_json($schizophrenic); # ["FOO","BAR","BUZ"]


=head1 PUBLIC METHODS

Devel-DTrace-Provider ( C/CH/CHRISA/Devel-DTrace-Provider-1.11.tar.gz, CHRISA, 2012; MetaCPAN )
Devel-DTrace-Provider/Provider.xs ( view source; MetaCPAN )
.h"

#include <usdt.h>

typedef enum {
        none = 0,
        integer,
        string,
        json
} perl_argtype_t;

STATIC MGVTBL probe_vtbl = { 0, 0, 0, 0, 0, 0, 0, 0 };
STATIC MGVTBL provider_
h: should be string");

        return (void *) ret;
}

static void *
json_argument(SV *obj)
{
        int count;
        SV *json;
        char *ret = NULL;

        dSP;

	ENTER;
        SAVETMPS;

     count = call_pv("JSON::to_json", G_EVAL | G_SCALAR);

        SPAGAIN;

        if (SvTRUE(ERRSV)) {
                (void )POPs;
                Perl_croak(aTHX_ "Error JSON serializing: %s\n", 
WWW-Getsy ( J/JG/JGOULAH/WWW-Getsy-0.999007.tar.gz, JGOULAH, 2012; MetaCPAN )
WWW-Getsy/lib/WWW/Getsy/Types.pm ( view source; MetaCPAN )
ecret 
    RequestParams
    RequestMethod 
    )];
use MooseX::Types::Moose qw/Str HashRef/;
use JSON::XS;
use MooseX::Getopt::OptionTypeMap;

subtype EnvVar,
    as Str,
    where { grep {defined &&
ap(
    RequestParams , '=s'
    );

coerce RequestParams,
    from Str,
    via {
        decode_json($_);
    };

enum RequestMethod , qw(get put post delete);

coerce RequestMethod,
    from Str,
 
Clustericious ( B/BD/BDUGGAN/Clustericious-0.9909.tar.gz, BDUGGAN, 2012; MetaCPAN )
Clustericious/share/MbdAppTemplate/t/001_basic.t ( view source; MetaCPAN )
cation/json" },
          qq[{ "app": "<%= $class %>", "version" : "$<%= $class %>::VERSION" }])
        ->status_is(200, "posted version");

$t->get_ok('/clustericious/<%= $class %>')
  ->json_conten
WWW-Getsy ( J/JG/JGOULAH/WWW-Getsy-0.999007.tar.gz, JGOULAH, 2012; MetaCPAN )
WWW-Getsy/lib/WWW/Getsy.pm ( view source; MetaCPAN )
 --method paramter to make post, put, and delete calls (get is default)
and --params to pass in a JSON string of parameters

    getsy --sandbox --path '/listings/51455722' --params '{"title" : "chang
:Getsy::OAuth;
    use File::HomeDir qw(home);
    use File::Spec::Functions qw(catfile);
    use JSON::XS;
    use MooseX::Getopt;
    use MooseX::Types::Moose qw/Str HashRef/;
    use WWW::Getsy::Ty
hod decode(Str $json) {
        decode_json $json;
    }

    method encode(HashRef $json) {
        JSON::XS->new->utf8->pretty->encode($json);
    }

    method pretty_print(Str $json) {
        pri
Hubot ( A/AA/AANOAA/Hubot-0.1.3.tar.gz, AANOAA, 2013; MetaCPAN )
Hubot/lib/Hubot.pod ( view source; MetaCPAN )
o '["help"]' > hubot-scripts.json
    $ hubot
    hubot> hubot help
    hubot> exit

=head1 DESCRIPTION

=head2 CONFIGURATION

describe scripts name to F<hubot-scripts.json>

example)

    [
      "he

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