Group
Extension

Matches 35358

WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN/Object.pm ( view source; MetaCPAN )
========
sub get_converter # ($function)
{
  my $convert = ($_[0] =~ s/:JSON$//
                 ? 'WebService::NFSN::decode_json'
                 : '');

  return $convert;
} # end get_converter

#-
Acme-JWT ( C/CL/CLAIRVY/Acme-JWT-0.04.tar.gz, CLAIRVY, 2011; MetaCPAN )
Acme-JWT/lib/Acme/JWT.pm ( view source; MetaCPAN )
package Acme::JWT;
use strict;
use warnings;
our $VERSION = '0.04';

use JSON qw/decode_json encode_json/;
use MIME::Base64 qw/encode_base64url decode_base64url/;
use Try::Tiny;
use Digest::SHA qw/hma
=> $algorithm,
    };
    push(@$segments, encode_base64url(encode_json($header)));
    push(@$segments, encode_base64url(encode_json($payload)));
    my $signing_input = join('.', @$segments);
    un
 $payload;
    my $signature;
    try {
        $header = decode_json(decode_base64url($header_segment));
        $payload = decode_json(decode_base64url($payload_segment));
        $signature = decod
Data-MultiValued ( D/DA/DAKKAR/Data-MultiValued-0.0.1_4.tar.gz, DAKKAR, 2011; MetaCPAN )
Data-MultiValued/lib/Data/MultiValued/UglySerializationHelperRole.pm ( view source; MetaCPAN )
tt',
 );

Later:

  my $json = JSON::XS->new->utf8;
  my $obj = My::Class->new(rr=>'foo');

  my $str = $json->encode($obj->as_hash);

  my $obj2 = My::Class->new_in_place($json->decode($str));

  # $
WWW-DataWiki ( T/TO/TOBYINK/WWW-DataWiki-0.001.tar.gz, TOBYINK, 2011; MetaCPAN )
WWW-DataWiki/lib/WWW/DataWiki/Utils.pm ( view source; MetaCPAN )
html\+xml}i;
		
		return WWW::DataWiki->FMT_JSON  if $format =~ m{^(RDF[\s_/-]?)?JSON}i;
		return WWW::DataWiki->FMT_JSON  if $format =~ m{^application/json}i;
		
		return WWW::DataWiki->FMT_XML   if 
WWW-DataWiki ( T/TO/TOBYINK/WWW-DataWiki-0.001.tar.gz, TOBYINK, 2011; MetaCPAN )
WWW-DataWiki/lib/WWW/DataWiki/Controller/Container.pm ( view source; MetaCPAN )
pplication/sparql-query, text/n3, text/turtle, text/plain, application/rdf+xml;q=0.5, application/json;q=0.1, application/xhtml+xml;q=0.1, text/html;q=0.1'});
		}
	}

	action container_OPTIONS
	{
		my
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN/Email.pm ( view source; MetaCPAN )
=======
BEGIN {
  __PACKAGE__->_define(
    type => 'email',
    methods => {
      'listForwards:JSON' => [],
      removeForward => [qw(forward)],
      setForward    => [qw(forward dest_email)],
  
WWW-DataWiki ( T/TO/TOBYINK/WWW-DataWiki-0.001.tar.gz, TOBYINK, 2011; MetaCPAN )
WWW-DataWiki/lib/WWW/DataWiki/HowNotToDoIt.pod ( view source; MetaCPAN )
e; charset=utf-8',
      'rdf'       => 'application/rdf+xml; charset=utf-8',
      'json'      => 'application/json',
      }->{$variant} || 'application/octet-stream';
    
    $headers{'Content-Typ
xml/i)        { $parser = RDF::Trine::Parser::RDFXML->new; }
      when (/json/i)       { $parser = RDF::Trine::Parser::RDFJSON->new; }
      when (/text.plain/i) { $parser = RDF::Trine::Parser::NTrip
Triples), application/xhtml+xml (i.e. XHTML+RDFa 1.0), application/rdf+xml and application/json (i.e. RDF/JSON).');
      }
    }
    
    # Check it's syntactically sound
    my $model;
    
    if (
WWW-DataWiki ( T/TO/TOBYINK/WWW-DataWiki-0.001.tar.gz, TOBYINK, 2011; MetaCPAN )
WWW-DataWiki/lib/WWW/DataWiki.pm ( view source; MetaCPAN )
		FMT_XHTML  => 'XHTML',
		FMT_HTML   => 'HTML',
		FMT_JSON   => 'RDFJSON',
		};

	use constant {
		FMT_RS_XML   => 'xml',
		FMT_RS_JSON  => 'json',
		FMT_RS_TEXT  => 'txt',
		FMT_RS_HTML  => 'html',
point. HTTP content negotiation serves up graph data as HTML, Turtle,
RDF/XML, JSON; and query results as HTML, XML, JSON, CSV or tab-delimited data.

WWW::DataWiki is fully RESTful, using HTTP B<GET>
Net-ZooTool ( Q/QU/QUELCOM/Net-ZooTool-0.0031.tar.gz, QUELCOM, 2011; MetaCPAN )
Net-ZooTool/lib/Net/ZooTool/Utils.pm ( view source; MetaCPAN )
package Net::ZooTool::Utils;

use Moose::Role;

use JSON::XS;
use Carp;
use Data::Dumper;
use Digest::SHA1 qw/sha1_hex/;
use WWW::Curl::Easy;

use namespace::autoclean;

our $VERSION = '0.003';

=head
URLINFO_HTTP_CODE);
        # judge result and next action based on $response_code
        return JSON::XS->new->utf8->decode($response_body);
    }
    else {
        carp(   "An error happened: $ret
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN.pm ( view source; MetaCPAN )
 Load a JSON package and define our decode_json function:

BEGIN
{
  if (_eval "use JSON::XS ()") {
    # Can't find JSON::XS, try JSON (2.0 or later):
    _eval_or_die "use JSON qw(decode_json)";
  }
    if ($JSON::XS::VERSION >= 2) {
      *decode_json = \&JSON::XS::decode_json;
    } else {
      *decode_json = \&JSON::XS::from_json; # old name for decode_json
    } # end else found JSON::XS pri
or to version 2.0
  } # end else we were able to load JSON::XS
} # end BEGIN

#=====================================================================
# Define exceptions:

use Exception::Class (
  'Web
Module-Install-ParseRequires ( R/RO/ROKR/Module-Install-ParseRequires-0.002.tar.gz, ROKR, 2011; MetaCPAN )
Module-Install-ParseRequires/lib/Module/Install/ParseRequires.pm ( view source; MetaCPAN )
equires <<_END_
    Moose
    Xyzzy 1.02
    JSON 2
    _END_

Is equivalent to:

    requires 'Moose' => 0
    requires 'Xyzzy' => 1.02
    requires 'JSON' => 2

=head2 parse_requires $kind, $documen
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/tools/My_Build.pm ( view source; MetaCPAN )
JSON 2 can substitute for JSON::XS:

sub prereq_failures
{
  my $self = shift @_;

  my $out = $self->SUPER::prereq_failures(@_);

  return $out unless $out;

  if (my $attrib = $out->{requires}{'JSON
    my $message;

    eval "use JSON 2 ();";

    if (not $@) {
      # JSON 2.0 or later is an acceptable replacement for JSON::XS:
      delete $out->{requires}{'JSON::XS'};

      # Clean out empty
JSON 2.0 or later can substitute for JSON::XS, but its pure-Perl
   implementation is slower, and you don't have it installed either.

    } # end else we couldn't load JSON 2 either
  } # end if JSON
WWW-DataWiki ( T/TO/TOBYINK/WWW-DataWiki-0.001.tar.gz, TOBYINK, 2011; MetaCPAN )
WWW-DataWiki/lib/WWW/DataWiki/Resource/Container.pm ( view source; MetaCPAN )
>uri, 'n3'), ')',
									' (', a(-rel=>'rel:alternate', -href=>$ver->formatted_page_iri('json')->uri, 'json'), ')',
									br(
										-property => 'awol:published',
										-content  => $publ
Data-MultiValued ( D/DA/DAKKAR/Data-MultiValued-0.0.1_4.tar.gz, DAKKAR, 2011; MetaCPAN )
Data-MultiValued/lib/Data/MultiValued.pm ( view source; MetaCPAN )
ey are optimised for serialisation, see
L<Data::MultiValued::UglySerializationHelperRole> and F<t/json.t>.

=item *

you get accessors generated for your Moose attributes just by setting
a trait

=ite
WebService-NFSN ( C/CJ/CJM/WebService-NFSN-1.02.tar.gz, CJM, 2011; MetaCPAN )
WebService-NFSN/lib/WebService/NFSN/DNS.pm ( view source; MetaCPAN )
fresh retry)],
    methods => {
      addRR          => [qw(name type data ttl?)],
      'listRRs:JSON' => [qw(name? type? data?)],
      removeRR       => [qw(name type data)],
      updateSerial   =
JSON-signature-to-image ( T/TU/TURNERJW/JSON-signature-to-image-1.0.tar.gz, TURNERJW, 2011; MetaCPAN )
JSON-signature-to-image/test.pl ( view source; MetaCPAN )
ry.)

BEGIN { $| = 1; print "1..3\n"; }
END {print "not ok 1\n" unless $loaded;}
use GD;
use JSON::Parse;
$loaded = 1;
print "ok 1\n";

######################### End of black magic.
# Insert
Net-GraphSpace ( I/IR/IRONCAMEL/Net-GraphSpace-0.0009.tar.gz, IRONCAMEL, 2011; MetaCPAN )
Net-GraphSpace/lib/Net/GraphSpace/AttributesToJSON.pm ( view source; MetaCPAN )
package Net::GraphSpace::AttributesToJSON;
use Moose::Role;
use v5.10;

sub TO_JSON {
    my ($self) = @_;
    my @attrs = $self->meta->get_all_attributes;
    return { map $self->_affinitize($_), @at

    }
    return $name => $value;
}

1;

__END__
=pod

=head1 NAME

Net::GraphSpace::AttributesToJSON

=head1 VERSION

version 0.0009

=head1 AUTHOR

Naveed Massjouni <naveedm9@gmail.com>

=head1 COP
Net-Mogade ( H/HA/HALKEYE/Net-Mogade-0.001.tar.gz, HALKEYE, 2011; MetaCPAN )
Net-Mogade/lib/Net/Mogade.pm ( view source; MetaCPAN )
ET POST);
use LWP::ConnCache;
use Digest::SHA1;
use Params::Validate qw(validate);

use Carp;
use JSON::Any;

use fields qw(
    base
    key
    secret
);


use constant {
    SCOPE_DAILY => 1,
    S
 2,
    SCOPE_OVERALL => 3,
    SCOPE_YESTERDAY => 4,
};

our $connectionCacheLimit = 50;
our $json = JSON::Any->new(utf8=>1);

{
    my $cache;
    sub _getCache
    {
        $cache ||= LWP::ConnCac
,
            scope => 0,
    });

    my $response = $self->_get("ranks", %args);
    return $json->jsonToObj($response->content);
}

sub scoreSave
{
    my $self = shift;
    my %args = @_;
    vali
Plack-Middleware-OAuth ( C/CO/CORNELIUS/Plack-Middleware-OAuth-0.10.tar.gz, CORNELIUS, 2011; MetaCPAN )
Plack-Middleware-OAuth/lib/Plack/Middleware/OAuth/Handler/AccessTokenV2.pm ( view source; MetaCPAN )
ler);
use URI;
use URI::Query;
use LWP::UserAgent;
use Plack::Middleware::OAuth::AccessToken;
use JSON::Any;
use warnings;
use strict;

sub build_args {
    my ($self,$code) = @_;
    my $config = $se
sponse->header('Content-Type');
	my $atkn;

	if( $content_type =~ m{json} || $content_type =~ m{javascript} ) {

		my $params = JSON::Any->new->decode( $response_content );
        $atkn = Plack::Midd
JSON-signature-to-image ( T/TU/TURNERJW/JSON-signature-to-image-1.0.tar.gz, TURNERJW, 2011; MetaCPAN )
JSON-signature-to-image/signature-to-image.pl ( view source; MetaCPAN )
ture to Image: A supplemental script for Signature Pad that
generates an image of the signature's JSON output server-side using PHP.

project ca.thomasjbradley.applications.signaturetoimage

author Th
#(198)] [--ymax=#(55)] [--pen_color='r,g,b'(20,83,148)] [--background_color='r,g,b'(255,255,255)] json-file|-

-or-

cat jason-file | signature-to-image.pl [--multiplier=#(5)] [--penwidth=#(2)] [--xma
efile.png

-or-

#!/usr/bin/perl -w

require "signature-to-image.pl"

my ($img, $err) = &sig2png($json_image [, multiplier => #(5)] [, penwidth => #(2)] [, xmax => #(198)] [, ymax => #(55)] [, pen_col

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