Group
Extension

Matches 35358

Net-Digg ( K/KW/KWILMS/Net-Digg-0.11.tar.gz, KWILMS, 2007; MetaCPAN )
Net-Digg/lib/Net/Digg.pm ( view source; MetaCPAN )
ilms <wilms@cs.umn.edu>';
$VERSION     = 0.11;
use warnings;
use strict;

use LWP::UserAgent;
use JSON::Any;

=head1 NAME

Net::Digg - Quickly consume and interface with the Digg API.

=head1 SYNOPSIS
'http%3A%2F%2Fsearch.cpan.org%2Fdist%2FNet-Digg' unless defined $conf{appkey};
    $conf{type} = 'json' unless defined $conf{type};
    $conf{ua} = LWP::UserAgent->new();
    $conf{ua}->agent($conf{us
dle_args($queryargs);
    my $req = $self->{ua}->get($url);
    return ($req->is_success) ?  JSON::Any->jsonToObj($req->content) : undef;
}

=pod

=head2 get_popular_stories (\%params)

Given

=over

CGI-FileUpload ( A/AL/ALEXMASS/CGI-FileUpload-0.03.tar.gz, ALEXMASS, 2007; MetaCPAN )
CGI-FileUpload/lib/CGI/FileUpload.pm ( view source; MetaCPAN )
it button"

=item return_format=>(keyonly|text|json): the type of output at submission time (default is keyonly, but a text key=value perl line, but json should also be possible)

=item form_name=>str
key();
  }elsif($retformat eq 'text'){
    $ret="key=".$self->key()."\n";
  }elsif($retformat eq 'json'){
    $ret='not yet...';
  }else{
    $query->header(-type=>'text/plain');
    die "unknown retu
Solstice ( M/MC/MCRAWFOR/Solstice-1440.tar.gz, MCRAWFOR, 2007; MetaCPAN )
Solstice/lib/Solstice/Controller/Remote.pm ( view source; MetaCPAN )
rollers.

=cut

use base qw(Solstice::Controller);

use strict;
use warnings;
use 5.006_000;

use JSON;
use Solstice::View::Remote;
use Solstice::ButtonService;
use Solstice::Session;
use Solstice::CG
 #prepare the js data
    my $data    = param('solstice_remote_data');
    my $json = JSON->new();
    $data = $json->jsonToObj($data);

    #Okay, what controller do we run?
    my $config = Solstice
Froody ( F/FO/FOTANGO/Froody-42.041_2.tar.gz, FOTANGO, 2007; MetaCPAN )
Froody/lib/Froody/Request/Apache.pm ( view source; MetaCPAN )
e $vars->{'_froody_type'};
  $self->type($type);
  if ($type and $type eq 'json') {
    $self->callback( delete $vars->{"_json_callback"} );
  }
  $self->params($vars);
  
  return $self;
}

=item get
Froody ( F/FO/FOTANGO/Froody-42.041_2.tar.gz, FOTANGO, 2007; MetaCPAN )
Froody/lib/Froody/Request/CGI.pm ( view source; MetaCPAN )
, 1 );
      $vars{ $pname } = $value;
    }
  }

  if ($type and $type eq 'json') {
    $self->callback( delete $vars{"_json_callback"} );
  }

  $self->params(\%vars);
  
  return $self;
}

=back

=
Froody ( F/FO/FOTANGO/Froody-42.041_2.tar.gz, FOTANGO, 2007; MetaCPAN )
Froody/lib/Froody/Server.pm ( view source; MetaCPAN )
::Response;

use Froody::Logger;
my $logger = get_logger("froody.server");

use Froody::Renderer::json;

# XXX: move down to autoload when doing autodetect
eval q{
    use Apache::Constants;
    use F
ts the header for a type of server.

=cut

my $h4t = {
	xml => "text/xml; charset=utf-8",
	json => 'text/json',
};

sub content_type_for_type {
   my $class = shift;
   my $type  = shift;
   unless (@
Froody ( F/FO/FOTANGO/Froody-42.041_2.tar.gz, FOTANGO, 2007; MetaCPAN )
Froody/lib/Froody/SimpleClient.pm ( view source; MetaCPAN )
or::Chained::Fast );
__PACKAGE__->mk_accessors(qw( endpoint ));

use LWP::UserAgent;
use JSON::XS qw( from_json );
use HTTP::Request::Common;
use Encode qw( encode_utf8 );

=head1 ATTRIBUTES

=over

=
{ $_[0] } : @_;

  # we want json
  $args{_type} = "json";

  my $response = $self->call_raw($method, %args);
  # parse as Frooy/JSON response
  my $data = eval { from_json( $response ) };
  unless (r
Net-Social-Service-Twitter ( S/SI/SIMONW/Net-Social-Service-Twitter-0.1.tar.gz, SIMONW, 2007; MetaCPAN )
Net-Social-Service-Twitter/lib/Net/Social/Service/Twitter.pm ( view source; MetaCPAN )
 defined $res;
}



=head1 PREREQUISITES

This module uses Net::Twitter, so you'll need that (and JSON::Any).
You'll also need Net::Social.

=head1 CAVEATS

The 'friends' API method only returns the l
Class-Plugin-Util ( A/AS/ASKSH/Class-Plugin-Util-0.009.tar.gz, ASKSH, 2007; MetaCPAN )
Class-Plugin-Util/lib/Class/Plugin/Util.pm ( view source; MetaCPAN )
## no critic;
    } ## no critic

}

1; # keep require happy.

__END__

=pod

=for stopwords YAML JSON CPAN Solem Gaal Yahas pre namespace

=head1 NAME

Class::Plugin::Util - Utility functions for sup
ty to export data.
Right now you need support for exporting to a list of formats, let's say YAML, JSON and XML,

As there are several implementations of YAML on CPAN you want to load the best module t
ST_OF_JSON_HANDLERS = qw(
            MyApp::Export::JSON::Syck
            MyApp::Export::JSON::PC
            MyApp::Export::JSON
        );

        my %FORMAT_TO_HANDLER = (
            'JSON'  =>
Template-Plugin-deJSON ( S/ST/STRYTOAST/Template-Plugin-deJSON-0.03.tar.gz, STRYTOAST, 2007; MetaCPAN )
Template-Plugin-deJSON/lib/Template/Plugin/deJSON.pm ( view source; MetaCPAN )
package Template::Plugin::deJSON;

=head1 NAME

  Template::Plugin::DeJSON - de-JSONify a JSON string

=head1 SYNOPSIS

  [%
    USE deJSON;
    hash = deJSON.deJSON(json_string);
    FOREACH field=ha
IPTION

Well, I needed this. I had JSON string things flying around between servers,
and passed into templates. (If you must know, objects were stringified using
JSON, and bit-shifted around the world
thing a bit more useful.

So it takes a JSON string, and gives you back a hash. Or me. It gives it back
to me. YMMV.

It also copes with JSON strings within JSON strings, returning a nice data
structu
WWW-Metaweb ( H/HD/HDS/WWW-Metaweb-0.02.tar.gz, HDS, 2007; MetaCPAN )
WWW-Metaweb/lib/WWW/Metaweb.pm ( view source; MetaCPAN )
package WWW::Metaweb;

use 5.008006;
use strict;
use warnings;

use JSON::XS;
use LWP::UserAgent;
use URI::Escape;
use HTTP::Request;
use Carp;

# debugging
use Data::Dumper;

our $VERSION = '0.02';
o
lread',
				  write_uri => '/api/service/mqlwrite',
				  trans_uri => '/api/trans',
				  pretty_json => 1 );

  my $query = {
	  '/type/object/creator' => undef,
	  cover_appearances => [{
	    type
uery, 'json');
  print $result;

The complicated way:

  $mh->add_query('read', $query);
  $mh->send_envelope('read')
    or die $WWW::Metaweb::errstr;

  my $result = $mh->result('read', 'json');
  p
WWW-Metaweb ( H/HD/HDS/WWW-Metaweb-0.02.tar.gz, HDS, 2007; MetaCPAN )
WWW-Metaweb/lib/WWW/Metaweb/JSONLikePerl.pm ( view source; MetaCPAN )
:JSONLikePerl;

use 5.008006;
use strict;
use warnings;

use Exporter;

our @ISA	 = qw(Exporter);
our @EXPORT	 = qw();
our @EXPORT_OK	 = qw(jsonlp_fetch jsonlp_replace jsonlp_insert jsonlp_quote jsonl
_TAGS = (standard => [qw(jsonlp_fetch jsonlp_replace jsonlp_insert jsonlp_quote jsonlp_unquote)]);
our $VERSION	= 0.01;

=head1 NAME

WWW::Metaweb::JSONLikePerl - Access a JSON string like a Perl stru
cture

=head1 SYNOPSIS

  use strict;
  use WWW::Metaweb::JSONLikePerl qw(:standard);

  my json = qq({
        "cover_appearances": [
          {
            "part_of_series": "Runaways", 
          
HTML-WidgetValidator ( N/NA/NANZOU/HTML-WidgetValidator-0.0.3.tar.gz, NANZOU, 2007; MetaCPAN )
HTML-WidgetValidator/lib/HTML/WidgetValidator/Widget/Twitter.pm ( view source; MetaCPAN )
> 'text/javascript',
	    src  => qr{http://twitter\.com/statuses/user_timeline/[0-9A-Za-z\-_]+\.json\?callback=twitterCallback2&count=\d+},
	}},
      { type => 'end', name=>'script' } ],

    [
> 'text/javascript',
	    src  => qr{http://twitter\.com/statuses/user_timeline/[0-9A-Za-z\-_]+\.json\?callback=twitterCallback2&count=\d+},
	}},
      { type => 'end', name=>'script' } ],


]);
Socialtext-Resting-RSS ( L/LU/LUKEC/Socialtext-Resting-RSS-0.01.tar.gz, LUKEC, 2007; MetaCPAN )
Socialtext-Resting-RSS/lib/Socialtext/Resting/RSS.pm ( view source; MetaCPAN )
package Socialtext::Resting::RSS;
use strict;
use warnings;
use Carp qw/croak/;
use JSON;
use XML::RSS;
use Text::Diff;
use File::Path qw/mkpath/;

=head1 NAME

Socialtext::Resting::RSS - Create rss f
    my $json_text;
        { local $/; $json_text = <$fh> }
        close $fh;
        my $json = jsonToObj($json_text);
        $cache{$json->{page_id}} = $json;
        print "  Loaded $json->{page_
}";
        open(my $fh, ">$filename") or die "Can't write $filename: $!";
        print $fh objToJson($new->{$p});
        close $fh or die "Can't write $filename: $!";
    }

    # Pages will never 
Metaweb ( S/SK/SKUD/Metaweb-0.05.tar.gz, SKUD, 2007; MetaCPAN )
Metaweb/lib/Metaweb.pm ( view source; MetaCPAN )
use warnings;
use strict;

use base qw(Class::Accessor);
use URI::Escape;
use LWP::UserAgent;
use JSON::XS;
use Metaweb::Result;

__PACKAGE__->mk_accessors(qw(
    username
    password
    server
   
 - any other website built on the Metaweb platform.

The Metaweb Query Language (MQL) is based on JSON and query-by-example.
The MQL and API documentation can be found on the Freebase website in
the d
# all people!
  });

The query is a a Perl data structure that's converted to JSON using the
L<JSON::XS> module's C<to_json()> method.  The MQL envelope will
automatically be put around the query, usi
Config-PlConfig ( A/AS/ASKSH/Config-PlConfig-0.1_02.tar.gz, ASKSH, 2007; MetaCPAN )
Config-PlConfig/lib/Config/PlConfig/DotScheme.pm ( view source; MetaCPAN )
);

    property plconfig => isa_Object('Config::PlConfig');
    property dumper   => isa_String('JSON');

    my $GLOBAL_AUTOSAVE = 0;

    my %DUMPER = (
        'YAML' => sub {
            require 

            return XML::Simple::XMLout(@_);
        },
        'JSON' => sub {
            require JSON::Syck;
            return JSON::Syck::Dump(@_);
        },
    );

    sub write_key {
        
Net-Flickr-Simile ( A/AS/ASCOPE/Net-Flickr-Simile-0.1.tar.gz, ASCOPE, 2007; MetaCPAN )
Net-Flickr-Simile/lib/Net/Flickr/Simile/Exhibit.pm ( view source; MetaCPAN )
 getopts('c:j:h:t:', \%opts);

 my $cfg = Config::Simple->new($opts{'c'});

 my %args = ('exhibit_json' => $opts{'j'},
             'exhibit_html' => $opts{'h'},
             'tags' => $opts{'t'});

 
lt B<name> argument is "__report". The default B<min_level> argument
is "info".

=back

=cut

use JSON::Any;
use IO::AtomicFile;
use File::Basename;

=head1 PACKAGE METHODS

=cut

=head2 __PACKAGE__->
the I<flickr.photos.search>
API method and :

=over 4

=item * B<exhibit_json>

String. I<required>

The path where Exhbit JSON data should be written to disk.

=item * B<exhibit_html>

String. I<requ
Net-Flickr-Simile ( A/AS/ASCOPE/Net-Flickr-Simile-0.1.tar.gz, ASCOPE, 2007; MetaCPAN )
Net-Flickr-Simile/lib/Net/Flickr/Simile.pm ( view source; MetaCPAN )
 getopts('c:j:h:t:', \%opts);

 my $cfg = Config::Simple->new($opts{'c'});

 my %args = ('exhibit_json' => $opts{'j'},
             'exhibit_html' => $opts{'h'},
             'tags' => $opts{'t'});

 
WWW-Stickam-API ( T/TO/TOMYHERO/WWW-Stickam-API-0.02.tar.gz, TOMYHERO, 2007; MetaCPAN )
WWW-Stickam-API/lib/WWW/Stickam/API.pm ( view source; MetaCPAN )
t;
use warnings;
use base qw/Class::Accessor::Fast/;
use XML::Simple;
use UNIVERSAL::require;
use JSON::XS ;
use Time::HiRes;

our $VERSION = '0.02';

__PACKAGE__->mk_accessors(qw/data content error t
 get_XML {
    my $s = shift;
    return $s->{content};
}

sub get_JSON {
    my $s = shift;
    my $data = $s->get();
    return JSON::XS->new->utf8->pretty(1)->encode( $data );;
}

1;

=head1 NAME

=> 'stickam' } ) ) {
    print Dumper $api->get();
    print $api->get_XML();
    print $api->get_JSON();
 }
 else {
    print $api->error ;
 }

=head1 DESCRIPTION

Perl implementation of Stickam API.
WWW-Stickam-API ( T/TO/TOMYHERO/WWW-Stickam-API-0.02.tar.gz, TOMYHERO, 2007; MetaCPAN )
WWW-Stickam-API/lib/WWW/Stickam/API/Search/User.pm ( view source; MetaCPAN )
e=>'stickam' } ) ) {
    print Dumper $api->get();
    print $api->get_XML();
    print $api->get_JSON();
 }
 else {
    print $api->error ;
 }

=head1 METHOD

=head2 uri

=head1 SEE ALSO

http://labs

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