Group
Extension

Matches 35358

DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, BBYRD, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Admin.pm ( view source; MetaCPAN )
BICConnectInfo DBICHashRef/;
use MooseX::Types::JSON qw(JSON);
use MooseX::Types::Path::Class qw(Dir File);
use Try::Tiny;
use JSON::Any qw(DWIW XS JSON);
use namespace::autoclean;

=head1 NAME

DBIx:
ash ref or json string to be used for identifying data to manipulate

=cut

has 'where' => (
  is      => 'rw',
  isa     => DBICHashRef,
  coerce  => 1,
);


=head2 set

a hash ref or json string to 
> (
  is      => 'rw',
  isa     => DBICHashRef,
  coerce  => 1,
);


=head2 attrs

a hash ref or json string to be used for passing additional info to the ->search call

=cut

has 'attrs' => (
  is  
DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, BBYRD, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Manual/FAQ.pod ( view source; MetaCPAN )
m .. store JSON/YAML in a column and have it deflate/inflate automatically?

You can use L<DBIx::Class::InflateColumn> to accomplish YAML/JSON storage transparently.

If you want to use JSON, then in 
lowing:

 use JSON;

 __PACKAGE__->add_columns(qw/ ... my_column ../)
 __PACKAGE__->inflate_column('my_column', {
     inflate => sub { jsonToObj(shift) },
     deflate => sub { objToJson(shift) },
 }
HTTP-LRDD ( T/TO/TOBYINK/HTTP-LRDD-0.106.tar.gz, TOBYINK, 2012; MetaCPAN )
HTTP-LRDD/lib/HTTP/LRDD.pm ( view source; MetaCPAN )
f ($response->content_type =~ m'^(application/rdf\+xml|(application|text)/(x-)?(rdf\+)?(turtle|n3|json))'i)
	{
		if (uc $response->request->method ne 'GET')
		{
			$self->_ua->max_redirect(3);
			$res
le';
		$type = 'RDFXML'  if $response->content_type =~ /rdf.xml/;
		$type = 'RDFJSON' if $response->content_type =~ /json/;
	}
	else
	{
		return ($response, undef);
	}
	
	$response->is_success or retu
Clustericious-Client ( B/BD/BDUGGAN/Clustericious-Client-0.75.tar.gz, BDUGGAN, 2012; MetaCPAN )
Clustericious-Client/lib/Clustericious/Client.pm ( view source; MetaCPAN )
IS

tracks.pm :

    package Tracks;
    use Clustericious::Client;

    route 'mixes' => '/mixes.json';
    route_doc mixes => 'Get a list of mixes.';
    route_args mixes => [
        { name => 'api
to
a data structure if it is application/json.

=cut

use Mojo::Base qw/-base/;

use Mojo::UserAgent;
use Mojo::ByteStream qw/b/;
use Mojo::Parameters;
use JSON::XS;
use Clustericious::Config;
use Clu
erence is passed, the method changes to POST and the hash is
encoded into the body as application/json.

=item modifies_payload, key

Describes how the parameter modifies the payload.

'hash' means se
MooseX-Attribute-Deflator ( P/PE/PERLER/MooseX-Attribute-Deflator-2.2.2.tar.gz, PERLER, 2012; MetaCPAN )
MooseX-Attribute-Deflator/README.pod ( view source; MetaCPAN )
 Loading L<MooseX::Attribute::Deflator::Moose>
will cause HashRefs and ArrayRefs to be encoded as JSON strings. However, you can simply overwrite
those deflators (and inflators) to deflate to somethin
C<benchmark.pl> tests three ways of deflating the value of a HashRef attribute
to a json encoded string (using L<JSON>).

 my $obj     = MyBenchmark->new( hashref => { foo => 'bar' } );
 my $attr    =
ate($obj); 

Using the deflate attribute method, supplied by this module.

=item accessor

 JSON::encode_json($obj->hashref);

If the attribute comes with an accessor, you can use this
method, to defl
DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, GETTY, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Optional/Dependencies.pod ( view source; MetaCPAN )
BIx::Class administrative library

=over

=item * JSON::Any >= 1.22

=item * Moose >= 0.98

=item * MooseX::Types >= 0.21

=item * MooseX::Types::JSON >= 0.02

=item * MooseX::Types::Path::Class >= 0.
tem * Getopt::Long::Descriptive >= 0.081

=item * JSON::Any >= 1.22

=item * Moose >= 0.98

=item * MooseX::Types >= 0.21

=item * MooseX::Types::JSON >= 0.02

=item * MooseX::Types::Path::Class >= 0.
Morpheus ( D/DR/DRUXA/Morpheus-0.46.tar.gz, DRUXA, 2012; MetaCPAN )
Morpheus/debuild/source/t/script.t ( view source; MetaCPAN )
,
    'morph without arguments prints json'
);

$result = qx(bin/morph /foo/bar);
like(
    $result,
    qr/^(5|"5")\n$/,
    'morph without arguments prints json'
);

$result = qx(bin/morph --format=
CPAN-Local ( P/PS/PSHANGOV/CPAN-Local-0.010.tar.gz, PSHANGOV, 2012; MetaCPAN )
CPAN-Local/lib/CPAN/Local/Manual.pod ( view source; MetaCPAN )


=item L<CPAN::Indexer::Mirror>

Write mirror.yml and mirror.json

=item L<File::Rsync::Mirror::Recentfile>

Read and write RECENT-XX.json files

=item L<Parse::CPAN::MirroredBy>

Read MIRRORED.BY

=
DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, BBYRD, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Admin/Types.pm ( view source; MetaCPAN )
pes::JSON qw(JSON);

subtype DBICArrayRef,
    as ArrayRef;

subtype DBICHashRef,
    as HashRef;

coerce DBICArrayRef,
  from JSON,
  via { _json_to_data ($_) };

coerce DBICHashRef,
  from JSON,
  v
 _json_to_data($_) };

subtype DBICConnectInfo,
  as ArrayRef;

coerce DBICConnectInfo,
  from JSON,
   via { return _json_to_data($_) } ;

coerce DBICConnectInfo,
  from Str,
    via { return _json_t
via { [ $_ ] };

sub _json_to_data {
  my ($json_str) = @_;
  my $json = JSON::Any->new(allow_barekey => 1, allow_singlequote => 1, relaxed=>1);
  my $ret = $json->jsonToObj($json_str);
  return $ret;
RDF-RDFa-Linter ( T/TO/TOBYINK/RDF-RDFa-Linter-0.053.tar.gz, TOBYINK, 2012; MetaCPAN )
RDF-RDFa-Linter/lib/RDF/RDFa/Linter/Service/SchemaOrg.pm ( view source; MetaCPAN )
rdf_statement' };
use File::ShareDir qw[];
use File::Spec qw[];
use Set::Scalar;
use JSON qw[decode_json encode_json];
use Scalar::Util qw[looks_like_number blessed];

our $VERSION = '0.053';

use RDF
     );
	mkdir $jpdir unless -d $jpdir;
	my $json_path = File::Spec->catfile(
        File::Spec->tmpdir,
        'RDF-RDFa-Linter',
        'schemaorg.json',
        );
	my $owl_path = File::ShareDir
	
	if (-f $json_path)
	{
		my @json_stat = stat $json_path;
		my @owl_stat  = stat $owl_path;
		if ($json_stat[9] >= $owl_stat[9]) # if JSON as uptodate as OWL
		{
			open my $fh, '<', $json_path;
			
Yars ( B/BD/BDUGGAN/Yars-0.77.tar.gz, BDUGGAN, 2012; MetaCPAN )
Yars/lib/Yars/Routes.pm ( view source; MetaCPAN )
        $r{$disk}{count} = Yars::Tools->count_files($disk) if $count;
    }
    return $c->render_json(\%r) unless $c->param('all');
    my %all = ( Yars::Tools->server_url => \%r );
    for my $serve
   $all{$server} = $res->json;
    }
    return $c->render_json(\%all);
};

=head2 POST /disk/status

Mark disks up or down.  Send the disk root and state (up or down)
as JSON encoded in the body.

=c
);
    }
    $c->render_text($success ? "ok" : "failed" );
};

=head2 POST /check/manifest

Given JSON with 'manifest' which is a return-delimited string
of filenames and md5s (like the output of md5s
Yars ( B/BD/BDUGGAN/Yars-0.77.tar.gz, BDUGGAN, 2012; MetaCPAN )
Yars/lib/Yars/Tools.pm ( view source; MetaCPAN )
se Data::Dumper;
use Try::Tiny;
use File::Path qw/mkpath/;
use File::Temp;
use File::Compare;
use JSON::XS;
use File::stat qw/stat/;
use Mojo::ByteStream qw/b/;
use strict;
use warnings;

our %Bucket2
tateFile;
    return $cached if $mod_time && $mod_time == stat($StateFile)->mtime;
    our $j ||= JSON::XS->new;
    -e $StateFile or LOGDIE "Missing state file $StateFile";
    $cached = $j->decode(M
{
    my $class = shift;
    my $state = shift;
    my $dir = dirname($StateFile);
    our $j ||= JSON::XS->new;
    mkpath $dir;
    my $temp = File::Temp->new(DIR => $dir, UNLINK => 0);
    print $t
Yars ( B/BD/BDUGGAN/Yars-0.77.tar.gz, PLICEASE, 2012; MetaCPAN )
Yars/lib/Yars/Command/yars_generate_diskmap.pm ( view source; MetaCPAN )
ers + hosts to buckets for yars.
our $VERSION = '1.33'; # VERSION


use strict;
use warnings;
use JSON::MaybeXS ();
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );
use feature 'say'
 $_, buckets => $servers{$host}{$_} }, keys %{ $servers{$host} }
        ]};
    }

    my $out = JSON::MaybeXS->new->space_after->encode({ servers => \@conf });
    $out =~ s/{/\n{/g;
    $out =~ s/\
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/Request/REST.pm ( view source; MetaCPAN )
EST-y subclass of Catalyst::Request

=head1 SYNOPSIS

     if ( $c->request->accepts('application/json') ) {
         ...
     }

     my $types = $c->request->accepted_content_types();

=head1 DESCRI
MooseX-Attribute-Deflator ( P/PE/PERLER/MooseX-Attribute-Deflator-2.2.2.tar.gz, PERLER, 2012; MetaCPAN )
MooseX-Attribute-Deflator/benchmark.pl ( view source; MetaCPAN )
ware, licensed under:
#
#   The (three-clause) BSD License
#
package MyBenchmark;

use Moose;
use JSON;
use DateTime;

use MooseX::Attribute::Deflator::Moose;
use MooseX::Attribute::Deflator;

has has
flator'],
    default => sub { { foo => 'bar' } }
);

package main;
use strict;
use warnings;
use JSON;
use Benchmark qw(:all);

my $obj  = MyBenchmark->new;
my $attr = $obj->meta->get_attribute('hash
> sub {
            $attr->deflate($obj);
        },
        get_value => sub {
            JSON::encode_json( $attr->get_value( $obj, 'hashref' ) );
        },
        accessor => sub {
            m
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/Action/REST.pm ( view source; MetaCPAN )
ia Type" error. What gives?!

A:  Most likely, you haven't set Content-type equal to "application/json", or
one of the accepted return formats.  You can do this by setting it in your query
accepted re
mats.  You can do this by setting it in your query string
thusly: C<< ?content-type=application%2Fjson (where %2F == / uri escaped). >>

B<NOTE> Apache will refuse %2F unless configured otherwise.
Mak
Yars ( B/BD/BDUGGAN/Yars-0.77.tar.gz, PLICEASE, 2012; MetaCPAN )
Yars/lib/Yars/Command/yars_balance.pm ( view source; MetaCPAN )
get($bucket_map_url);
    if(my $res = $tx->success)
    {
      my %server_bucket_map = %{ $res->json };
      my %my_bucket_map = %{ $yars->tools->bucket_map };
      
      foreach my $key (keys %m
JavaScript-Console ( A/AK/AKZHAN/JavaScript-Console-0.01.tar.gz, AKZHAN, 2012; MetaCPAN )
JavaScript-Console/lib/JavaScript/Console.pm ( view source; MetaCPAN )
e JSON::XS ();

use constant DEFAULT_CHARSET => 'utf-8';

my $json = undef;

sub _default_formatter {
    my $value = shift;
    $json ||= JSON::XS->new->allow_nonref->allow_blessed;
    return $json-
value ), returns JavaScript representation for the value.
                                        JSON::XS-based by default.

    * charset   - Charset, utf-8 by default.

=cut

sub new {
    my ( $cl
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/Action/Serialize/JSONP.pm ( view source; MetaCPAN )
package Catalyst::Action::Serialize::JSONP;
use Moose;
use namespace::autoclean;

extends 'Catalyst::Action::Serialize::JSON';

our $VERSION = '1.06';
$VERSION = eval $VERSION;

after 'execute' => sub
.$c->res->output().');');
    } else {
      warn 'Callback: '.$callback_value.' will not generate valid Javascript. Falling back to JSON output';
    }
  }
};

__PACKAGE__->meta->make_immutable;

1;
Catalyst-Action-REST ( B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz, BOBTFISH, 2012; MetaCPAN )
Catalyst-Action-REST/lib/Catalyst/TraitFor/Request/REST.pm ( view source; MetaCPAN )
        # cope with invalid (missing required q parameter) header like:
            # application/json; charset="utf-8"
            # http://tools.ietf.org/html/rfc2616#section-14.1
            unless
ing it REST methods and attributes.

=head1 SYNOPSIS

     if ( $c->request->accepts('application/json') ) {
         ...
     }

     my $types = $c->request->accepted_content_types();

=head1 DESCRI

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