Group
Extension

Matches 32272

Grimlock ( D/DH/DHOSS/Grimlock-0.11.tar.gz, DHOSS, 2012; MetaCPAN )
Grimlock/lib/Grimlock/Schema/Result/Entry.pm ( view source; MetaCPAN )
0.11';
}

use Grimlock::Schema::Candy -components => [
  qw(
      TimeStamp
      Helper::Row::ToJSON
      +DBICx::MaterializedPath
      )
];

use HTML::Scrubber;

resultset_class 'Grimlock::Schema
ne->name;
  return $date_time;
}


sub TO_JSON {
  my $self = shift;
  return {
    reply_count => $self->reply_count,
    children => $self->children_TO_JSON,
    parent   => $self->parent,
    body 
    => $self->body,
    %{ $self->next::method },
  }
}

sub children_TO_JSON {
  my $self = shift;
  my $children_rs = $self->children;
  my @child_collection;
  push @child_collection, {
    entryid
WWW-Facebook-FQL-Simple ( A/AJ/AJCT/WWW-Facebook-FQL-Simple-0.03.tar.gz, AJCT, 2012; MetaCPAN )
WWW-Facebook-FQL-Simple/lib/WWW/Facebook/FQL/Simple.pm ( view source; MetaCPAN )
trict;
use warnings;

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

my $API_BASE = 'http://api.facebook.com/method/fql.query?format=json&query=';


sub query {
 
encode( $API_BASE . $args->{query} ) );

    if ( $response->is_success ) {
        return decode_json $response->content;
    }
    else {
        croak $response->status_line;
    }

}


1;

__END__
ike_count FROM link_stat WHERE url="http://twitter.com"'
    });

Returns a hash reference of the JSON returned from the API.

=head1 SEE ALSO

L<Facebook>, L<WWW::Facebook::API>, L<WWW::Facebook::FQL
Net-OneTimeSecret ( K/KY/KYLED/Net-OneTimeSecret-0.04.tar.gz, KYLED, 2012; MetaCPAN )
Net-OneTimeSecret/lib/Net/OneTimeSecret.pm ( view source; MetaCPAN )
package Net::OneTimeSecret;

our $VERSION = "0.04";

use common::sense;
use JSON;
use LWP::UserAgent;
use URI::Escape;
use Encode qw( encode_utf8 decode_utf8 );

my $_USER_AGENT  = LWP::UserAgent->new
a );
    return from_json( decode_utf8( $response->decoded_content ) );
}

sub _get {
    my ($self, $url) = @_;
    my $response = $_USER_AGENT->get( $url );
    return from_json( $response->decoded_
ent

You call it with Perl data, and get back Perl data.  No messing
with encoding or decoding of JSON.

=item * Unicode

Unicode, errrm, seems to work OK.


=back

=head1 DESCRIPTION

See https://one
Dancer-Plugin-DebugToolbar ( O/OD/ODYNIEC/Dancer-Plugin-DebugToolbar-0.016.tar.gz, ODYNIEC, 2011; MetaCPAN )
Dancer-Plugin-DebugToolbar/lib/Dancer/Plugin/DebugToolbar.pm ( view source; MetaCPAN )
iguration as JSON
    my $cfg_json = to_json($toolbar_cfg);
    
    # Do some replacements so that the JSON data can be made into a JS string
    # wrapped in single quotes
    $cfg_json =~ s!\\!\\\\
!gm;
    $cfg_json =~ s!\n!\\\n!gm;
    $cfg_json =~ s!'!\\'!gm;

    $html =~ s/%DEBUGTOOLBAR_CFG%/$cfg_json/m;
    
    my $uri_base = request->uri_base . $path_prefix;
    $html =~ s/%BASE%/$uri_ba
WWW-TypePad ( S/SA/SAYMEDIA/WWW-TypePad-0.4002.tar.gz, SAYMEDIA, 2011; MetaCPAN )
WWW-TypePad/lib/WWW/TypePad.pm ( view source; MetaCPAN )
'0.4002';

use Any::Moose;
use Carp qw( croak );
use HTTP::Request::Common;
use HTTP::Status;
use JSON;
use LWP::UserAgent;
use Net::OAuth::Simple;
use WWW::TypePad::Error;

# TODO import flag to prel
 my $api = shift;
    my( $key ) = @_;
    return $api->call_anon( GET => '/api-keys/' . $key . '.json' );
}

sub uri_for {
    my $api = shift;
    my( $path ) = @_;
    $path = '/' . $path unless $p
$method eq 'PUT') and $qs) {
            $extra{ContentBody} = JSON::encode_json($qs);
            $extra{ContentType} = 'application/json';
        }

        my $oauth = $api->oauth;
        $res = 
Net-MessageBus ( H/HO/HOREA/Net-MessageBus-0.08.tar.gz, HOREA, 2012; MetaCPAN )
Net-MessageBus/lib/Net/MessageBus.pm ( view source; MetaCPAN )
Net::MessageBus::Base';

use Net::MessageBus::Message;

use IO::Socket::INET;
use IO::Select;
use JSON;

$| = 1;

=head1 SYNOPSIS

This module implements the client side of the Message Bus.

    use N
$/ = "\n";
    
    my $socket = $self->{server_socket};
    
    eval {
        print $socket to_json( {type => $type, payload => $object} );
    };
    
    if ($@) {
        $self->logger->error("M
s/(.*?)\n+// ) {
            
                my $text = $1;
    
                my $data = from_json($text);
            
                if (defined $data->{type} && $data->{type} eq 'message') {
 
WWW-DNSMadeEasy ( G/GE/GETTY/WWW-DNSMadeEasy-0.001.tar.gz, GETTY, 2012; MetaCPAN )
WWW-DNSMadeEasy/lib/WWW/DNSMadeEasy.pm ( view source; MetaCPAN )
TP;
use Digest::HMAC_SHA1 qw(hmac_sha1 hmac_sha1_hex);
use LWP::UserAgent;
use HTTP::Request;
use JSON;

use WWW::DNSMadeEasy::Domain;

our $VERSION ||= '0.0development';

has api_key => (
	is => 'ro'
request->header('Accept' => 'application/json');
	if (defined $data) {
		$request->header('Content-Type' => 'application/json');
		$request->content(encode_json($data));
	}
	my $res = $self->_http_age
nt->request($request);
	if ($res->is_success) {
		return decode_json($res->content);
	} else {
		die __PACKAGE__.' HTTP request failed: '.$res->status_line, "\n";
	}
}

#
# DOMAINS
#

sub path_domains
Opsview-StatusAPI ( J/JL/JLMARTIN/Opsview-StatusAPI-0.02.tar.gz, JLMARTIN, 2012; MetaCPAN )
Opsview-StatusAPI/lib/Opsview/StatusAPI.pm ( view source; MetaCPAN )
structures.

=cut

use strict;
use warnings;
use Carp;
use HTTP::Request;
use LWP::UserAgent;
use JSON::Any;

our $VERSION = '0.02';

our $states = { 'ok' => 0, 'warning' => '1', 'critical' => '2', 'u
;

  $self->{'_url'} = $self->_get_url();
  $self->{'_ua'} = LWP::UserAgent->new;
  $self->{'_json'} = JSON::Any->new;

  return $self;
}

sub _get_url {
  my $self = shift;
  return sprintf('%s://%s/
sword'});

  my $req = HTTP::Request->new( GET => $url );
  $req->header( 'Content-Type' => 'text/json' );
  $req->header( 'X-Username' => $self->{'user'} );
  $req->header( 'X-Password' => $self->{'p
Text-TEI-Collate ( A/AU/AURUM/Text-TEI-Collate-2.1.tar.gz, AURUM, 2011; MetaCPAN )
Text-TEI-Collate/scripts/show_columns.pl ( view source; MetaCPAN )
ziness, $language ) = ( 25, 50, 'Default' );
my( $CSV, $storable, $outfile, $infile, $text, $cx, $json, $debug, %argspec );

GetOptions( 'csv' => \$CSV,
	    'width=i' => \$col_width,
	    'storable' 
s' => \$outfile,
	    'store=s' => \$infile,
	    'text' => \$text,
	    'cx' => \$cx,
	    'json' => \$json,
	    'debug:i' => \$debug,
	    'argspec=s' => \%argspec,
	    'fuzziness=i' => \$fuzzines
', 'sliding' => 0, 'inclusive' => 0 );
}

## Get busy. 
my( @files ) = @ARGV;
if( $json ) {  # The 'file' is the JSON string.
    my @lines;
    while( <> ) {
	push( @lines, $_ );
    }
    @files = (
Dancer-Plugin-FormattedOutput ( A/AJ/AJKALD/Dancer-Plugin-FormattedOutput-0.01.tar.gz, AJKALD, 2011; MetaCPAN )
Dancer-Plugin-FormattedOutput/lib/Dancer/Plugin/FormattedOutput.pm ( view source; MetaCPAN )
ormats
    JSON_FT  => "json",
    XML_FT   => "xml",
    YAML_FT  => "yaml",
    TEXT_FT  => "text",
    HTML_FT  => "html",

    # Content Types
    JSONP_CT => "text/javascript",
    JSON_CT  => "a
pplication/json",
    XML_CT   => 'text/xml',
    YAML_CT  => 'application/yaml',
    TEXT_CT  => "text/plain",
};

=head1 SYNOPSIS

Similar in functionality to the standard Dancer serialisation routi
a format using templates

=item Allows per-call configuration of default format

=item Works with jsonp

=back

    use Dancer::Plugin::FormattedOutput;

    get '/some/route' => sub {
        my $dat
Business-Cart-Generic ( R/RS/RSAVAGE/Business-Cart-Generic-0.85.tgz, RSAVAGE, 2012; MetaCPAN )
Business-Cart-Generic/lib/Business/Cart/Generic/View/Search.pm ( view source; MetaCPAN )
package Business::Cart::Generic::View::Search;

use strict;
use warnings;

use JSON::XS;

use Moose;

extends 'Business::Cart::Generic::View::Base';

use namespace::autoclean;

our $VERSION = '0.85';
Business-Cart-Generic ( R/RS/RSAVAGE/Business-Cart-Generic-0.85.tgz, RSAVAGE, 2012; MetaCPAN )
Business-Cart-Generic/lib/Business/Cart/Generic/View/Product.pm ( view source; MetaCPAN )
package Business::Cart::Generic::View::Product;

use strict;
use warnings;

use JSON::XS;

use Moose;

use Text::Xslate 'mark_raw';

extends 'Business::Cart::Generic::View::Base';

use namespace::auto
CPAN-Testers-Metabase ( D/DA/DAGOLDEN/CPAN-Testers-Metabase-1.999002.tar.gz, DAGOLDEN, 2012; MetaCPAN )
CPAN-Testers-Metabase/lib/CPAN/Testers/Metabase/Demo.pm ( view source; MetaCPAN )
$data_dir->mkpath or die "coudln't make path to $data_dir";

  my $index = $data_dir->file('index.json');
  $index->touch;

  my $archive = $data_dir->file('archive.sqlite');

  return Metabase::Libra
Scaffold ( K/KE/KESTEB/Scaffold-0.10.tar.gz, KESTEB, 2012; MetaCPAN )
Scaffold/lib/Scaffold/Handler/ExtPoll.pm ( view source; MetaCPAN )
eTime;
use Scaffold::Class
  version => $VERSION,
  base    => 'Scaffold::Handler',
  codec   => 'JSON',
;

# ----------------------------------------------------------------------
# Public Methods
# 
;
    $self->stash->view->template_disabled(1);
    $self->stash->view->content_type('application/json');

}

# ----------------------------------------------------------------------
# Private Methods
Task-KiokuDB ( D/DO/DOY/Task-KiokuDB-0.07.tar.gz, DOY, 2012; MetaCPAN )
Task-KiokuDB/lib/Task/KiokuDB.pm ( view source; MetaCPAN )


Defaults to false, unless C<uuid.h> can be found and you have a compiler.

=item L<JSON::XS>

Provides faster JSON performance.

Defaults to true if you have a compiler.

=item L<YAML::XS>

Allows d
AnyMQ-RawSocket ( R/RE/REVMISCHA/AnyMQ-RawSocket-0.02.tar.gz, REVMISCHA, 2012; MetaCPAN )
AnyMQ-RawSocket/lib/AnyMQ/Topic/Trait/RawSocket.pm ( view source; MetaCPAN )
vent (@events) {
        # send as json to connected listeners
        foreach my $connection ($self->bus->all_connections) {
            $connection->push_write(json => $event);
        }
    }
};

1
Net-Fluidinfo ( F/FX/FXN/Net-Fluidinfo-0.45.tar.gz, FXN, 2012; MetaCPAN )
Net-Fluidinfo/lib/Net/Fluidinfo/Permission.pm ( view source; MetaCPAN )
 },
        headers    => $fin->accept_header_for_json,
        on_success => sub {
            my $response = shift;
            my $h = $class->json->decode($response->content);
            $class->
h
            );
        }
    );
}

sub update {
    my $self = shift;

    my $payload = $self->json->encode({policy => $self->policy, exceptions => $self->exceptions});
    $self->fin->put(
       
path),
        query   => { action => $self->action },
        headers => $self->fin->headers_for_json,
        payload => $payload
    );
}

no Moose;
no MooseX::ClassAttribute;
__PACKAGE__->meta->ma
App-Prolix ( G/GA/GAAL/App-Prolix-0.03.tar.gz, GAAL, 2012; MetaCPAN )
App-Prolix/lib/App/Prolix.pm ( view source; MetaCPAN )
MooseX::ConfigFromFile";
use JSON 2.0;

sub get_config_from_file {
    my($file) = @_;
    open my $fh, "<", $file or confess "open: $file: $!";
    local $/;
    my $json = <$fh>;
    close $fh or di
e "close: $file: $!";
    return JSON->new->relaxed->utf8->decode($json);
}

}

use Data::Munge;
use IO::File;
use IPC::Run ();
use Term::ReadKey ();
use Term::ReadLine;
use Text::Balanced ();
use Try
Net-COLOURlovers ( H/HA/HAGGAI/Net-COLOURlovers-0.01.tar.gz, HAGGAI, 2011; MetaCPAN )
Net-COLOURlovers/lib/Net/COLOURlovers/Lover.pm ( view source; MetaCPAN )
nings;

use JSON qw( from_json );

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

    my $response =
      $self->{'ua'}
      ->post("http://www.colourlovers.com/api/lover/$lover?format=json");
    retu
->{'ua'}
      ->post( $url || 'http://www.colourlovers.com/api/lovers?format=json',
        $args );

    return from_json $response->content;
}

sub lovers_new {
    my ( $self, $args ) = @_;
    re
/api/lovers/new?format=json' );
}

sub lovers_top {
    my ( $self, $args ) = @_;
    return $self->lovers( $args,
        'http://www.colourlovers.com/api/lovers/top?format=json' );
}

1;

__END__
=p
NLP-Service ( V/VI/VIKAS/NLP-Service-0.02.tar.gz, VIKAS, 2011; MetaCPAN )
NLP-Service/lib/NLP/Service.pm ( view source; MetaCPAN )
otably they are XML, YAML and JSON.
The URIs need to end with C<.xml>, C<.yml> and C<.json> for XML, YAML and JSON, respectively.

=over

=item B<GET> I</nlp/models.(json|xml|yml)> 

Returns an array 
 strings.

=item B<GET> I</nlp/languages.(json|xml|yml)>

Returns an array of supported languages. Default is "en" for English.

=item B<GET> I</nlp/info.(json|xml|yml)>

Returns a hashref of details 
T> I</nlp/relations.(json|xml|yml)>

The user can get a list of all the english grammatical relations supported by
the NLP backend.

=item B<GET/POST> I</nlp/parse/B<$model>.(json|xml|yml)>

The user 

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