Group
Extension

Matches 35359

Pithub ( P/PL/PLU/Pithub-0.01011.tar.gz, OALDERS, 2011; MetaCPAN )
Pithub/lib/Pithub/Markdown.pm ( view source; MetaCPAN )
"github/gollum",
            mode => "gfm",
        },
    );

    # Note that response is NOT in JSON, so ->content will die
    my $html = $response->raw_content;

=head1 AUTHOR

Johannes Plunien <p
IO-Storm ( G/GP/GPHAT/IO-Storm-0.01.tar.gz, GPHAT, 2011; MetaCPAN )
IO-Storm/lib/IO/Storm.pm ( view source; MetaCPAN )
m::VERSION = '0.01';
}
use Moose;

use IO::Handle qw(autoflush);
use IO::File;
use JSON::XS qw(decode_json encode_json);
use Log::Log4perl;
use IO::Storm::Tuple;

# ABSTRACT: Perl support for Twitter'
 ($self) = @_;

    return decode_json($self->read_string_message);
}


sub send_message_to_parent {
    my ($self, $href) = @_;

    $self->send_to_parent(encode_json($href));
}


sub send_to_parent 


Read a message from the ShellBolt and decode it from JSON.

=head2 send_message_to_parent

Sent a message to the ShellBolt, encoding it as JSON.

=head2 send_to_parent

Send a message to the ShellBo
Catalyst-Helper-Controller-DBIC-API-REST ( A/AM/AMIRI/Catalyst-Helper-Controller-DBIC-API-REST-0.08.tar.gz, AMIRI, 2011; MetaCPAN )
Catalyst-Helper-Controller-DBIC-API-REST/lib/Catalyst/Helper/Controller/DBIC/API/REST.pm ( view source; MetaCPAN )
roducer;

    use strict;
    use warnings;
    use base qw/MyApp::ControllerBase::REST/;
    use JSON::XS;

    __PACKAGE__->config(
        action             =>  { setup => {
                      
ject}->get_columns;
    }
}

1;
__compclass__
package [% class %];

use strict;
use warnings;
use JSON::XS;

use parent qw/[% app %]::ControllerBase::REST/;

__PACKAGE__->config(
    # Define parent c
Data-Encoder ( X/XA/XAICRON/Data-Encoder-0.05.tar.gz, XAICRON, 2011; MetaCPAN )
Data-Encoder/lib/Data/Encoder.pm ( view source; MetaCPAN )
  use Data::Encoder;

  my $encoder = Data::Encoder->load('JSON');
  my $json = $encoder->encode(['foo']);
  my $data = $encoder->decode($json);

=head1 DESCRIPTION

Data::Encoder is generic interface
sary, and create new instance of using the given arguments.

  my $encoder = Data::Encoder->load('JSON', +{ utf8 => 1, pretty => 1 });
  
  my $encoder = Data::Encoder->load('+My::Encoder', +{ option 
IO-Storm ( G/GP/GPHAT/IO-Storm-0.01.tar.gz, DSBLANCH, 2011; MetaCPAN )
IO-Storm/lib/IO/Storm/Spout.pm ( view source; MetaCPAN )
 a spout tuple message.

:param tup: the tuple to send to Storm.  Should contain only
            JSON-serializable data.
:type tup: list
:param tup_id: the ID for the tuple. Leave this blank for an
 
Net-OAuth2-Moosey-Client ( R/RC/RCL/Net-OAuth2-Moosey-Client-0.02.tar.gz, RCL, 2011; MetaCPAN )
Net-OAuth2-Moosey-Client/lib/Net/OAuth2/Moosey/AccessToken.pm ( view source; MetaCPAN )
$access_token = $token_object->valid_access_token();

=cut

use Moose::Util::TypeConstraints;
use JSON;
use Carp;
use URI::Escape;
use YAML qw/LoadFile DumpFile Dump/;
use MooseX::Types::URI qw(Uri Fi
%s/%s", $response->code, $response->title );
    }
    my $obj = eval{local $SIG{__DIE__}; decode_json($response->decoded_content)} || {};
    if( not $obj->{access_token} ){
        croak( "No access
ror_uri state/) {
        $hash{$_} = $self->{$_} if defined $self->{$_};
    }
    return encode_json(\%hash);
}

=head2 sync_with_store

Sync with the store file.
First reads out the current data fr
JavaScript-JSLint ( S/SP/SPJW/JavaScript-JSLint-0.07.tar.gz, SPJW, 2011; MetaCPAN )
JavaScript-JSLint/lib/JavaScript/JSLint.pm ( view source; MetaCPAN )
Id$

package JavaScript::JSLint;

use strict;
use warnings;

use Carp;
use JavaScript;
use JSON qw(encode_json);

use base qw( Exporter );

our @EXPORT = qw( jslint );
our @EXPORT_OK = qw( jslint jsli
json(
        [ split(/\n/, $js_source) ]
    );

    my $predef = $opt{predef} || {};
    if ( $predef && ref $predef eq 'HASH' ) {
        %{$predef} = map {
            $_ => ( $predef->{$_} ? JSON
::true : JSON::false )
        } keys %{$predef};
    }
    $opt{predef} = $predef;

    my $opt_str = encode_json( { 
        map {
            $_ => (
                ($JSLINT_OPTIONS{$_} && $JSLINT
Geo-Coder-ArcGIS ( G/GR/GRAY/Geo-Coder-ArcGIS-0.01.tar.gz, GRAY, 2011; MetaCPAN )
Geo-Coder-ArcGIS/lib/Geo/Coder/ArcGIS.pm ( view source; MetaCPAN )
package Geo::Coder::ArcGIS;

use strict;
use warnings;

use Carp qw(croak);
use JSON;
use LWP::UserAgent;
use URI;

our $VERSION = '0.01';
$VERSION = eval $VERSION;

sub new {
    my ($class, %params)
 if $self->{https};
    $uri->query_form(
        SingleLine => $location,
        f          => 'json',
        outFields  => '*',
    );

    my $res = $self->{response} = $self->ua->get(
        $u
 return unless $res->is_success;

    # Change the content type of the response from 'application/json' so
    # HTTP::Message will decode the character encoding.
    $res->content_type('text/plain');
Net-OAuth2-Moosey-Client ( R/RC/RCL/Net-OAuth2-Moosey-Client-0.02.tar.gz, RCL, 2011; MetaCPAN )
Net-OAuth2-Moosey-Client/lib/Net/OAuth2/Moosey/Client.pm ( view source; MetaCPAN )
onse = $self->auth_client->post( @post_args );


=cut

use Carp;
use LWP::UserAgent;
use URI;
use JSON;
use HTTP::Request;
use HTTP::Request::Common;
use Net::OAuth2::Moosey::AccessToken;
use MooseX::
us_line . ": " . $response->decoded_content );
        }
        
        my $res_params = _parse_json($response->decoded_content);
        $res_params = _parse_query_string($response->decoded_content
tr);
    return {$uri->query_form};
}

# Parse json non-fataly
sub _parse_json {
    my $str = shift;
    my $obj = eval{local $SIG{__DIE__}; decode_json($str)};
    return $obj;
}

1;
=head1 LICENSE 
Text-TEI-Collate ( A/AU/AURUM/Text-TEI-Collate-2.1.tar.gz, AURUM, 2011; MetaCPAN )
Text-TEI-Collate/lib/Text/TEI/Collate/Manuscript.pm ( view source; MetaCPAN )
pe 'SourceType',
	as 'Str',
	where { $_ =~ /^(xmldesc|plaintext|json)$/ },
	message { 'Source type must be one of xmldes, plaintext, json' };
	
subtype 'Sigil',
	as 'Str',
	where { $_ =~ /\A$xml10_nam
=> 'ro',
    isa => 'Str',
    default => 'Default',
    );

has 'source' => (  # Can be XML obj, JSON data struct, or string.
	is => 'ro',
	required => 1,
);

has 'msdesc' => (  # if we started with 
( length( $w_obj->word ) == 0 );
		push( @words, $w_obj );
 	}
 	return @words;
}

sub _init_from_json {
	my( $self, $wit ) = @_;
	$self->sigil( $wit->{'id'} );
	$self->identifier( $wit->{'name'} );
	
Catalyst-Engine-Stomp ( P/PM/PMOONEY/Catalyst-Engine-Stomp-0.17.tar.gz, PMOONEY, 2011; MetaCPAN )
Catalyst-Engine-Stomp/lib/Catalyst/Engine/Stomp.pm ( view source; MetaCPAN )
    utf8             => 1,
       subscribe_headers => {
         transformation       => 'jms-to-json',
       }
    },
  );
  MyApp->run();

  # In a controller, or controller base class:
  use base
61613'
       },
       ],
       subscribe_headers => {
         transformation       => 'jms-to-json',
       },
       connect_headers => {
         login => 'myuser',
         passcode => 'mypassw
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Events.pm ( view source; MetaCPAN )
         sort        => 'lastTime',
            dir         => 'DESC',
            history     => JSON::false,
        },
    };

    # Check the args
    $self->_check_args($args, $definition);

    
         sort        => 'lastTime',
            dir         => 'DESC',
            params      => JSON::null,
        },
    };

    # Check the args
    $self->_check_args($args, $definition);

    #
nition = {
        defaults    => {
            direction   => 'DESC',
            history     => JSON::false,
        },
    };

    # Check the args
    $self->_check_args($args, $definition);

    
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Device.pm ( view source; MetaCPAN )
n = {
        defaults    => {
            updates     => JSON::false,
            deletion    => JSON::false,
            sendevent   => JSON::false,
            sort        => 'name',
            di

    # Argument definition
    my $definition = {
        defaults    => {
            monitor => JSON::false,
            start   => 0,
            limit   => 50,
            sort    => 'name',
     
n = {
        defaults    => {
            updates     => JSON::false,
            deletion    => JSON::false,
            sendEvent   => JSON::false,
            start       => 0,
            limit  
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/lib/Text/TNetstrings.pm ( view source; MetaCPAN )
ification, a simple data
interchange format better suited to low-level network communication than
JSON. See http://tnetstrings.org/ for more details.

	use Text::TNetstrings qw(:all);

	my $data = enc
Redis-Dump ( T/TB/TBR/Redis-Dump-0.016.tar.gz, TBR, 2011; MetaCPAN )
Redis-Dump/lib/Redis/Dump/Config.pm ( view source; MetaCPAN )
kage Redis::Dump::Config;

use Moose;
use MooseX::Types::Path::Class;
with 'MooseX::Getopt';

use JSON;
use Redis 1.904;

# ABSTRACT: It's a simple way to dump and backup config from redis-server
our 
} = $value;
    }

    return %cf;
}

sub _restore {
    my $self = shift;
    my %keys = %{ from_json( $self->restore->slurp ) };
    foreach my $key ( keys %keys ) {
        my $value = $keys{$key} 
Dumper( \$dump->run );

=head1 DESCRIPTION

It's a simple way to dump config from redis-server in JSON format or any format
you want.

=head1 COMMAND LINE API

This class uses L<MooseX::Getopt> to pro
WWW-USF-Directory ( D/DO/DOUGDUDE/WWW-USF-Directory-0.003001.tar.gz, DOUGDUDE, 2011; MetaCPAN )
WWW-USF-Directory/ex/email_autocomplete.pl ( view source; MetaCPAN )
xing
	Directory;

use 5.008;
use strict;
use warnings 'all';

use parent 'CGI::Application';

use JSON 2.00; # The API was changed
use Try::Tiny;
use WWW::USF::Directory;

sub setup {
	my ($self) = @_
ults and response
	my (@results, $response);

	# Set the header to specity JSON
	$self->header_add(-type => 'application/json');

	try {
		# Search the directory
		@results = $self->{directory}->searc
il } } @results;

		# Return the JSON-encoded results to print
		$response = JSON->new->encode(\@results);
	}
	catch {
		# Return an empty JSON list
		$response = JSON->new->encode([]);
	};

	# Return
Catalyst-Engine-Stomp ( P/PM/PMOONEY/Catalyst-Engine-Stomp-0.17.tar.gz, PMOONEY, 2011; MetaCPAN )
Catalyst-Engine-Stomp/lib/Catalyst/Controller/MessageDriven.pm ( view source; MetaCPAN )
 used to serialiser/deserialise. See Data::Serializer to see
what is available. Defaults to YAML. JSON is anotther that is available.


=cut

class_type 'Data::Serializer';
my $serializer_t = subtype 
Redis-Dump ( T/TB/TBR/Redis-Dump-0.016.tar.gz, TBR, 2011; MetaCPAN )
Redis-Dump/lib/Redis/Dump/Restore.pm ( view source; MetaCPAN )

package Redis::Dump::Restore;

use Moose;
use MooseX::Types::Path::Class;
use JSON;
with 'MooseX::Getopt';

use Redis 1.904;

# ABSTRACT: It's a simple way to restore data to redis-server based on re
     }
        }
    }
}

sub _set_values_by_keys {
    my $self = shift;

    my %keys = %{ from_json( $self->file->slurp ) };
    $self->_conn->flushall if $self->flushall;

    foreach my $key ( ke
xt');

=head1 DESCRIPTION

It's a simple way to restore data to redis-server based on redis-dump (JSON).

=head1 COMMAND LINE API

This class uses L<MooseX::Getopt> to provide a command line api. The 
HTML-HTML5-Outline ( T/TO/TOBYINK/HTML-HTML5-Outline-0.006.tar.gz, TOBYINK, 2011; MetaCPAN )
HTML-HTML5-Outline/lib/HTML/HTML5/Outline.pm ( view source; MetaCPAN )
NAME

HTML::HTML5::Outline - implementation of the HTML5 Outline algorithm

=head1 SYNOPSIS

	use JSON;
	use HTML::HTML5::Outline;
	
	my $html = <<'HTML';
	<!doctype html>
	<h1>Hello</h1>
	<h2>World</
Morning</h1>
	<h2>Vietnam</h2>
	HTML
	
	my $outline = HTML::HTML5::Outline->new($html);
	print to_json($outline->to_hashref, {pretty=>1,canonical=>1});

=head1 DESCRIPTION

This is an implementation o
 algorithm, as per
L<http://www.w3.org/TR/html5/sections.html#outlines>.

The module can output a JSON-friendly hashref, or an RDF model.

=head2 Constructor

=over

=item * C<< HTML::HTML5::Outline->
Text-TEI-Collate ( A/AU/AURUM/Text-TEI-Collate-2.1.tar.gz, AURUM, 2011; MetaCPAN )
Text-TEI-Collate/lib/Text/TEI/Collate/Word.pm ( view source; MetaCPAN )
string - the initial word string that should be parsed into its forms

=item *

json - a hash, presumably read from JSON, that has all the attributes

=item *

empty - a flag to say that this should b

ok( !$word->is_empty, "Word is not empty");

# Initialize a word from a JSON string, check its values
use JSON qw( decode_json );
my $jstring = encode_utf8( '{"c":"Արդ","n":"արդ","punctuation":
"Առդ"}' );
$word = Text::TEI::Collate::Word->new( json => decode_json($jstring), ms_sigil => 'B' );
is( $word->word, 'Առդ', "Got correct JSON word before modification" );
is( $word->canonical_fo

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