Group
Extension

Matches 35358

Railsish ( G/GU/GUGOD/Railsish-0.21.tar.gz, GUGOD, 2009; MetaCPAN )
Railsish/lib/Railsish/Controller.pm ( view source; MetaCPAN )
ss;

    for(qw(request response controller action format params
           session render render_json render_xml redirect_to)) {
        *{"$caller\::$_"} = *{"$_"};
    }

    for (@Railsish::Contro
utf8($output));
}


use JSON -convert_blessed_universally;
sub render_json {
    my %variables = @_;

    my $json = JSON->new;
    $json->allow_blessed(1);

    my $out = $json->encode(\%variables);

    $response->headers->header('Content-Type' => 'text/x-json');
    $response->body( Encode::encode_utf8($out) );
}

use XML::Simple;
sub render_xml {
    # still not write testing

    my %variable
Parley ( C/CH/CHISEL/Parley-1.2.1.tar.gz, CHISEL, 2009; MetaCPAN )
Parley/lib/Parley/Controller/My.pm ( view source; MetaCPAN )
rsion;  our $VERSION = $Parley::VERSION;
use base 'Catalyst::Controller';

use Image::Magick;
use JSON;
use Image::Size qw( html_imgsize imgsize );

use Parley::App::Error qw( :methods );

# ~~~~~~~~~

    my ($self, $c) = @_;
    my ($return_data, $json);
    my $fieldname = $c->request->param('fieldname');

    $c->response->content_type('text/json');

    $return_data->{old_value} = $c->request-
return_data->{updated} = 0;
                $json = to_json($return_data);
                $c->response->body( $json );
                $c->log->info( $json );
                return;
            };
 
App-Rad-Plugin-ConfigLoader ( G/GA/GARU/App-Rad-Plugin-ConfigLoader-0.01.tar.gz, GARU, 2009; MetaCPAN )
App-Rad-Plugin-ConfigLoader/lib/App/Rad/Plugin/ConfigLoader.pm ( view source; MetaCPAN )
o load your application's configuration file in any format supported by Config::Any (Apache-like, JSON, YAML, XML, Windows INI, etc).

    $c->load_config('somefile.yml');

Then just access its items 
Data-Transform ( M/MA/MARTIJN/Data-Transform-0.06.tar.gz, TYRRMINAL, 2009; MetaCPAN )
Data-Transform/lib/Data/Transform/Type/DBIx/Recursive.pm ( view source; MetaCPAN )
SCRIPTION

C<Data::Transform::Type::DBIx> is used to transform L<DBIx::Class::Row>
instances into JSON-able structures, using C<get_inflated_columns> to get make
a hashref from the object's keys (colu
Data-JavaScript-Anon ( A/AD/ADAMK/Data-JavaScript-Anon-1.03.tar.gz, ADAMK, 2009; MetaCPAN )
Data-JavaScript-Anon/lib/Data/JavaScript/Anon.pm ( view source; MetaCPAN )
es, contact the author.

=head1 AUTHOR

Adam Kennedy E<lt>adamk@cpan.orgE<gt>

=head1 SEE ALSO

L<JSON>, L<http://ali.as/>

=head1 COPYRIGHT

Copyright 2003 - 2009 Adam Kennedy.

This program is free 
Data-Transform ( M/MA/MARTIJN/Data-Transform-0.06.tar.gz, TYRRMINAL, 2009; MetaCPAN )
Data-Transform/lib/Data/Transform/Schema.pm ( view source; MetaCPAN )
y blessed($schema);
    say ref($schema);
    die("schema must be a JSON::Validator") unless (blessed($schema) && $schema->isa('JSON::Validator'));
  }

  method applies_to (%params) {
    my $node   
Data-Transform ( M/MA/MARTIJN/Data-Transform-0.06.tar.gz, TYRRMINAL, 2009; MetaCPAN )
Data-Transform/lib/Data/Transform/Type/DBIx.pm ( view source; MetaCPAN )
SCRIPTION

C<Data::Transform::Type::DBIx> is used to transform L<DBIx::Class::Row>
instances into JSON-able structures, using C<get_inflated_columns> to get make
a hashref from the object's keys (colu
WWW-Omegle ( R/RE/REVMISCHA/WWW-Omegle-0.02.tar.gz, REVMISCHA, 2009; MetaCPAN )
WWW-Omegle/lib/WWW/Omegle.pm ( view source; MetaCPAN )
package WWW::Omegle;

use 5.006000;
use strict;
use warnings;

use Carp qw/croak/;
use JSON;

use base qw/WWW::Mechanize/;
use HTTP::Async;
use HTTP::Request;
use HTTP::Request::Common;

our $VERSION 
ra;
    $self->{om_callbacks}->{$action} = $cb;
}

# process a HTTP::Response from /events. parse JSON and dispatch to callbacks
sub handle_event {
    my ($self, $res) = @_;

    unless ($res->is_suc
  # not JSON array of events
            $self->callback(error => "Got invalid JSON: " . $res->content);
            return;
        }
    }
    
    my $json = new JSON;
    my $events = $json->decod
CPAN-MirrorStatus ( S/SH/SHELLING/CPAN-MirrorStatus-0.02_01.tar.gz, SHELLING, 2009; MetaCPAN )
CPAN-MirrorStatus/lib/CPAN/MirrorStatus.pm ( view source; MetaCPAN )
n ($format) {
        when ("widget")  { render_widget() }
        when ("json")    { render_json() }
    }
}

sub render_json {

}

sub render_widget


1;



__END__
=head1 NAME

CPAN::MirrorStatus -
n.nctu.edu.tw"); #=> which mirror status do you want to know
  $q->query;
  $q->render("json");   #=> output json 
  $q->render("widget"); #=> output javascript widget

=head1 DESCRIPTION

=head1 AUTH
Chef ( H/HO/HOLOWAY/Chef-0.01.tar.gz, HOLOWAY, 2009; MetaCPAN )
Chef/lib/Chef/Recipe.pm ( view source; MetaCPAN )
package Chef::Recipe;

use warnings;
use strict;

use Moose;
use JSON;
use Data::Dumper;

has 'resource_collection' =>
  ( is => 'rw', isa => 'ArrayRef', default => sub { [] } );

sub add_resource {
 
}

sub prepare_json {
  my $self = shift;
  my @resource_collection;
  foreach my $resource ( @{ $self->resource_collection } ) {
    push( @resource_collection, $resource->prepare_json );
  }
  retur
Chef ( H/HO/HOLOWAY/Chef-0.01.tar.gz, HOLOWAY, 2009; MetaCPAN )
Chef/lib/Chef.pm ( view source; MetaCPAN )
package Chef;

use Chef::Recipe;
use Chef::Resource;
use Data::Dumper;
use JSON::Any qw(XS JSON DWIW);

require Exporter;
@ISA    = qw(Exporter);
@EXPORT = qw(resource node);

use warnings;
use strict
{
  my $data;
  while ( my $line = <STDIN> ) {
    $data = $data . $line;
  }
  $node_data = JSON::Any->jsonToObj($data);
  1;
}

=head2 resource

Create a new Chef Resource.  Valid resources are list
resource);
}

sub send_to_chef {
  print JSON::Any->objToJson(
    {
      node                => $node_data,
      resource_collection => $recipe->prepare_json
    }
  );
}

sub END {
  send_to_chef;
Chef ( H/HO/HOLOWAY/Chef-0.01.tar.gz, HOLOWAY, 2009; MetaCPAN )
Chef/lib/Chef/Resource.pm ( view source; MetaCPAN )
y $bit (@parts) {
    $class = $class . '::' . ucfirst($bit);
  }
  return $class;
}

sub prepare_json {
  my $self = shift;
  my $cr   = {};
  $cr->{'instance_vars'} = { '@name' => $self->name, };
  
options } ) ) {
    $cr->{'instance_vars'}->{ "@" . $key } = $self->options->{$key};
  }
  $cr->{'json_class'} = $self->ruby_class;
  return $cr;
}

sub AUTOLOAD {
  my $self = shift;
  my $attr = $Ch
Module-Build-JSAN ( D/DW/DWHEELER/Module-Build-JSAN-0.05.tar.gz, DWHEELER, 2009; MetaCPAN )
Module-Build-JSAN/lib/Module/Build/JSAN.pm ( view source; MetaCPAN )
:Basename qw(dirname);

sub new {
    my $pkg = shift;
    my %p = @_;
    $p{metafile} ||= 'META.json';
    if (my $keywords = delete $p{keywords} || delete $p{tags}) {
        if ($p{meta_merge}) {
ake_tarball($dist_dir);
    $self->delete_filetree($dist_dir);


#    $self->add_to_cleanup('META.json');
#    $self->add_to_cleanup('*.gz');
}

sub ACTION_manifest {
    my $self = shift;
    $self->
re('JSON_support')) {
        require JSON;
        $self->prepare_metadata( my $node = {} );
        open my $meta, '>', $metafile or die "Cannot open '$metafile': $!\n";
        print $meta JSON->ne
SOAPjr ( R/RO/ROBMAN/SOAPjr-1.1.4.tar.gz, ROBMAN, 2009; MetaCPAN )
SOAPjr/lib/SOAPjr/request.pm ( view source; MetaCPAN )
set {
    my $self  = shift;
    my $query = shift;
    my $cgi_query;
    my $count = 0;
    my $json;
    if (ref($query) ne 'HASH' && $query->can("param")) {
        # Make a copy
        $cgi_quer
>{json} ) {
            my $url_decoded_json = uri_unescape($query->{params}->{json});
            if ($self->{json}->can("decode")) {
                # Modern-ish 2.x JSON API
                $json =
 $self->{json}->decode( $url_decoded_json );
            } elsif ($self->{json}->can("jsonToObj")) {
                # Olde Version 1.x JSON API
                $json = $self->{json}->jsonToObj( $url_
SOAPjr ( R/RO/ROBMAN/SOAPjr-1.1.4.tar.gz, ROBMAN, 2009; MetaCPAN )
SOAPjr/lib/SOAPjr.pm ( view source; MetaCPAN )

use SOAPjr::request;
use SOAPjr::response;

=head1 NAME

SOAPjr - SOAP without the bloat and JR (JSON-RPC) with proper error handling and file uploads

=head1 VERSION

Version 1.1.4

=cut

our $VERSI
d documentation then replace t/pod-coverage.t.

Also need to create Server and Client modules ala JSON::RPC and more detailed example scripts.

=head1 ACKNOWLEDGEMENTS

See L<http://SOAPjr.org/specs.h
App-SocialSKK ( K/KE/KENTARO/App-SocialSKK-0.02.tar.gz, KENTARO, 2009; MetaCPAN )
App-SocialSKK/lib/App/SocialSKK/Plugin/Wikipedia.pm ( view source; MetaCPAN )
::Plugin::Wikipedia;
use strict;
use warnings;
use URI;
use URI::QueryParam;
use URI::Escape;
use JSON::Syck;
use Jcode;
use Encode::JavaScript::UCS;
use base qw(App::SocialSKK::Plugin);

sub get_cand
   => $text);
    my $res = $self->ua->get($uri);
    if ($res->is_success) {
        my $array = JSON::Syck::Load($res->content);
        map {
            my $text = Encode::JavaScript::UCS::decode(
JavaScript-Dumper ( P/PE/PERLER/JavaScript-Dumper-0.011.tar.gz, PERLER, 2009; MetaCPAN )
JavaScript-Dumper/lib/JavaScript/Dumper.pm ( view source; MetaCPAN )
Exporter;
use base "JSON::PP";
use overload;

use Carp ();
use B ();

use Class::C3;

$JavaScript::Dumper::VERSION = '0.011';

@JavaScript::Dumper::EXPORT = qw(js_dumper);

my $JSON; # cache

sub js_d
umper ($) { # encode
    ($JSON ||= __PACKAGE__->new)->encode(@_);
}

sub value_to_json {
	my ($self, $value) = @_;
	my $type = ref($value);
	if (!defined $value) {
		return "null";
	} elsif($type eq 
lean" => true, "call": function}]"; 

=head1 DESCRIPTION

This module uses L<JSON::PP> as base and overrides C<value_to_json> to accept SCALAR-refs to be returned without quotes.

=head1 FUNCTIONS

=o
SOAPjr ( R/RO/ROBMAN/SOAPjr-1.1.4.tar.gz, ROBMAN, 2009; MetaCPAN )
SOAPjr/lib/SOAPjr/response.pm ( view source; MetaCPAN )
r response::add_message()";
        return 0;
    }
}

sub output {
    my $self = shift;
    my $json;
    my $body = $self->get("BODY");
    if ($self->get("HEAD")->{errors}) {
        $self->set({ 
elf->{json}->can("encode")) {
        # Modern-ish 2.x JSON API
        $json = $self->{json}->encode( { HEAD => $self->get("HEAD"), BODY => $body } );
    } elsif ($self->{json}->can("objToJson")) {
 Version 1.x JSON API
        $json = $self->{json}->objToJson( { HEAD => $self->get("HEAD"), BODY => $body } );
    } else {
        # TODO: handle unknown JSON API
    }
    return $json;
}

sub sen
SOAPjr ( R/RO/ROBMAN/SOAPjr-1.1.4.tar.gz, ROBMAN, 2009; MetaCPAN )
SOAPjr/lib/SOAPjr/base.pm ( view source; MetaCPAN )
ut

our $VERSION = "1.0.1";

=head1 SYNOPSIS

    See perldoc SOAPjr for more info.

=cut

use JSON;
$JSON::UnMapping = 1;

sub new {
    my $self  = {};
    my $class = shift;
    bless $self, $class
 => 1,
        BODY     => 1,
        HEAD     => 1,
        OPTIONS  => 1
    };
    $self->{json} = JSON->new();
    return $self->_init(@_);
}

sub _init {
    my $self = shift;
    return $self;
}
WWW-Yahoo-InboundLinks ( A/AP/APLA/WWW-Yahoo-InboundLinks-0.07.tar.gz, APLA, 2009; MetaCPAN )
WWW-Yahoo-InboundLinks/lib/WWW/Yahoo/InboundLinks.pm ( view source; MetaCPAN )
 strict;
use warnings;

use vars qw($VERSION);

use LWP::UserAgent ();
use HTTP::Headers ();

use JSON ();

$VERSION = '0.07';

sub new {
	my $class = shift;
	my $appid = shift;
	
	my %options = @_;
	
parameters
	$self->{ua}     = LWP::UserAgent->new;
	$self->{appid}  = $appid;
	$self->{format} = 'json';
	
	foreach (keys %options) {
		$self->{$_} = $options{$_};
	}
	
	bless($self, $class);
}

sub u
esp, \@result);
	}
	
	if (wantarray) {
		return @result;
	} else {
		return $result[0];
	}
}

sub json_parser {
	my $self   = shift;
	my $resp   = shift;
	my $result = shift;
	
	my $content = $resp->c

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