Group
Extension

Matches 35358

Math-SimpleHisto-XS ( S/SM/SMUELLER/Math-SimpleHisto-XS-1.30.tar.gz, SMUELLER, 2014; MetaCPAN )
Math-SimpleHisto-XS/lib/Math/SimpleHisto/XS/Named.pm ( view source; MetaCPAN )
e = lc(shift);

  my $hist_dump = $self->{hist}->dump($type);

  my $rv = $Math::SimpleHisto::XS::JSON->encode({
    %$self,
    hist => $hist_dump,
    class => ref($self),
    histclass => ref($self
lass = shift;
  my $type = lc(shift);
  my $data = shift;

  my $struct = $Math::SimpleHisto::XS::JSON->decode($data);
  $class = delete $struct->{class};
  my $hclass = delete $struct->{histclass};
 
_from_dump()> methods
of the C<Math::SimpleHisto::XS> interface by wrapping the histogram dump
in JSON which contains the additional information.

If you always stick to using C<dump()> and C<new_from
PMInfoExtr ( N/NU/NUNOGMART/PMInfoExtr-0.006.tar.gz, NUNOGMART, 2014; MetaCPAN )
PMInfoExtr/bin/modules-extractor.pl ( view source; MetaCPAN )
			}
		}
	}

	if ($clean) {
		unlink "output.json";
	}

	if (-e "output.json") {
		open my $output, "<", "output.json" || die ("Can't open file output.json. $!");
		my $data = <$output>;
		print STDOU
Rose-DBx-Garden-Catalyst ( K/KA/KARMAN/Rose-DBx-Garden-Catalyst-0.180.tar.gz, KARMAN, 2014; MetaCPAN )
Rose-DBx-Garden-Catalyst/lib/Rose/DBx/Garden/Catalyst/Controller.pm ( view source; MetaCPAN )
alystX::CRUD::Controller::RHTMLO
with some additional/overridden methods for working with YUI and JSON.

=head1 METHODS

=cut

=head2 autocomplete_columns

Should return arrayref of fields to search w
CatalystX-CRUD-YUI ( K/KA/KARMAN/CatalystX-CRUD-YUI-0.031.tar.gz, KARMAN, 2014; MetaCPAN )
CatalystX-CRUD-YUI/lib/CatalystX/CRUD/YUI/LiveGrid.pm ( view source; MetaCPAN )
e Data::Dump qw( dump );
use MRO::Compat;
use mro "c3";
use base qw( Class::Accessor::Fast );
use JSON::XS ();
use Scalar::Util qw( blessed );
use CatalystX::CRUD::YUI::Serializer;

our $VERSION = '0.
An arrayref of column hashrefs. YUI LiveGrid API requires these.

=item url

The url for fetching JSON results.

=item show_related_values

A hashref of foreign key information.

=item col_filter

An 
$field_name ),

            sortable => ( $isa_field || $isa_chain )
            ? JSON::XS::true()
            : JSON::XS::false(),

            sort_prefix =>
                ( $form->metadata->sort
CHEF-REST-Client ( B/BP/BPATEL/CHEF-REST-Client-1.tar.gz, BPATEL, 2014; MetaCPAN )
CHEF-REST-Client/lib/CHEF/REST/Client.pm ( view source; MetaCPAN )
base; #REST
 pop @base; #CHEF
 push @INC, '/', @base;
};

use parent qw { CHEF::REST };
use Mojo::JSON;
use Module::Load;
use vars qw { $AUTOLOAD };

sub new {
  my $class = shift;
  my $param = {@_};
lf = shift;
    my $end_point = $self->api_end_point;
    my $mojo_json = new Mojo::JSON();
    my $list_of_roles = 
       $mojo_json->decode(
             $self->ua(  'client_name'   => $self->name 
CHEF-REST-Client ( B/BP/BPATEL/CHEF-REST-Client-1.tar.gz, BPATEL, 2014; MetaCPAN )
CHEF-REST-Client/lib/CHEF/Header.pm ( view source; MetaCPAN )
r->{'Accept'} = $method if defined $accept;
             $self->header->{'Accept'} = 'application/json' unless 
     defined $self->header->{'Accept'};           
      return $self->header->{'Accept'
URL-Social ( T/TO/TOREAU/URL-Social-0.07.tar.gz, TOREAU, 2014; MetaCPAN )
URL-Social/lib/URL/Social/Twitter.pm ( view source; MetaCPAN )
 shift;

    my $url = 'http://cdn.api.twitter.com/1/urls/count.json?url=' . $self->url;

    if ( my $share_count = $self->get_url_json($url)->{count} ) {
        return $share_count || 0;
    }
    
Math-SimpleHisto-XS ( S/SM/SMUELLER/Math-SimpleHisto-XS-1.30.tar.gz, SMUELLER, 2014; MetaCPAN )
Math-SimpleHisto-XS/lib/Math/SimpleHisto/XS.pm ( view source; MetaCPAN )

);

our @JSON_Modules = qw(JSON::XS JSON::PP JSON);
our $JSON_Implementation;
our $JSON;

foreach my $json_module (@JSON_Modules) {
  if (eval "require $json_module; 1;") {
    $JSON = $json_module->
;
    $JSON->indent(0) if $JSON->can('indent');
    $JSON->space_before(0) if $JSON->can('space_before');
    $JSON->space_after(0) if $JSON->can('space_after');
    $JSON->canonical(0) if $JSON->can(
'canonical');
    $JSON_Implementation = $json_module;
    last if $JSON;
  }
}

sub new {
  my $class = shift;
  my %opt = @_;

  if (defined $opt{bins}) {
    my $bins = $opt{bins};
    croak("Canno
Dancer-Plugin-RESTModel ( G/GA/GARU/Dancer-Plugin-RESTModel-0.02.tar.gz, GARU, 2014; MetaCPAN )
Dancer-Plugin-RESTModel/lib/Dancer/Plugin/RESTModel.pm ( view source; MetaCPAN )
   RESTModel:
        MyData:
          server: http://localhost:5000
          type: application/json
          clientattrs:
            timeout: 5

then use it from any of your routes/controllers:

CGI-IDS ( H/HI/HINNERK/PerlIDS/CGI-IDS-1.0217.tar.gz, HINNERK, 2014; MetaCPAN )
CGI-IDS/lib/CGI/IDS/Whitelist.pm ( view source; MetaCPAN )
 Libs ------------------------------------------------
use XML::Simple qw(:strict);
use Carp;
use JSON::XS;
use Encode;

#------------------------- Subs -----------------------------------------------

#   convert_if_marked_encoded
# DESCRIPTION
#   Tries to JSON-decode and flatten a value to a plain string if the key has been marked as JSON in the whitelist.
#   Other encodings may follow in futur
e.
# INPUT
#   HASHREF
#     + key
#     + value
# OUTPUT
#   The JSON-decoded and flattened 'value' if key is marked JSON. Plain keys and values, newline separated.
#   Untouched 'value' otherwise.
#
CHEF-REST-Client ( B/BP/BPATEL/CHEF-REST-Client-1.tar.gz, BPATEL, 2014; MetaCPAN )
CHEF-REST-Client/lib/CHEF/REST/Client/cookbooks.pm ( view source; MetaCPAN )
t all the cookbooks available. 

 $obj->cookbook()->list;

=cut

# this module will be passed tha json parsed hash 
# under ___data__() or variable.
# process it depending on the content expected.

su
RPC-EPC-Service ( K/KI/KIWANAMI/RPC-EPC-Service-v0.0.11.tar.gz, KIWANAMI, 2014; MetaCPAN )
RPC-EPC-Service/lib/RPC/EPC/Service.pm ( view source; MetaCPAN )
##########################################
# sexp encoding
# (This code is based on Mojolicious's JSON library.)

# Translate an argument object into S-expression text.
sub to_sexp {
  my $arg = shift
CatalystX-CRUD-YUI ( K/KA/KARMAN/CatalystX-CRUD-YUI-0.031.tar.gz, KARMAN, 2014; MetaCPAN )
CatalystX-CRUD-YUI/lib/CatalystX/CRUD/YUI/Controller.pm ( view source; MetaCPAN )
   default_view         => 'YUI',
    fmt_to_view_map      => {
        'html' => 'YUI',
        'json' => 'YUI',
        'xls'  => 'Excel',
    },
);

our $VERSION = '0.031';

=head1 NAME

CatalystX:
   default_view         => 'YUI',
    fmt_to_view_map      => {
        'html' => 'YUI',
        'json' => 'YUI',
        'xls'  => 'Excel',
    },
 );
 
 1;
 

=head1 DESCRIPTION

This is a base cont
   }

    }
    return $self;
}

=head2 json_mime

Returns JSON MIME type. Default is 'application/json; charset=utf-8'.

=cut

sub json_mime {'application/json; charset=utf-8'}

=head2 default

Redir
Data-Generator-FromDDL ( A/AD/ADDSICT/Data-Generator-FromDDL-0.06.tar.gz, ADDSICT, 2014; MetaCPAN )
Data-Generator-FromDDL/lib/Data/Generator/FromDDL/Formatter.pm ( view source; MetaCPAN )
package Data::Generator::FromDDL::Formatter;
use strict;
use warnings;
use Carp qw(croak);
use JSON ();
use Class::Accessor::Lite (
    new => 1,
    rw => [qw(format pretty bytes_per_sql)],
);

sub t
($self->format =~ /sql/i) {
            'to_sql';
        } elsif ($self->format =~ /json/i) {
            'to_json';
        } else {
            croak("Unsupported format: " . $self->format . "\n");
 $sqls;
}

sub to_json {
    my ($self, $table, $fields, $rows) = @_;
    my $json = do {
        if ($self->pretty) {
            JSON->new->pretty;
        } else {
            JSON->new;
        }
CHEF-REST-Client ( B/BP/BPATEL/CHEF-REST-Client-1.tar.gz, BPATEL, 2014; MetaCPAN )
CHEF-REST-Client/lib/CHEF/REST.pm ( view source; MetaCPAN )
EF
 push @INC, '/', @base;
};

use parent qw { CHEF CHEF::Header };
use LWP::UserAgent;
use Mojo::JSON;

sub new {
   my $class = shift;
   my $self  = $class->SUPER::new(@_);
   bless $self, $class;
	   );
	return $response;
}

sub post 
{
	my $self  = shift;
	my $param = {@_};
	my $mojo_json = new Mojo::JSON();
	my $response  = $self->add_headers( 
	                    $self->header(
		         
        'Path'    => $param->{'api_end_point'},
		                             'Content' => $mojo_json->encode($param->{'data'})
		                        )->hash
		                      )
		         
CatalystX-CRUD-YUI ( K/KA/KARMAN/CatalystX-CRUD-YUI-0.031.tar.gz, KARMAN, 2014; MetaCPAN )
CatalystX-CRUD-YUI/lib/CatalystX/CRUD/YUI/TT.pm ( view source; MetaCPAN )
talystX::CRUD view

=head1 SYNOPSIS

 use CatalystX::CRUD::YUI::TT;
 
 # in a template
 [% foo.as_json %]
 [% foo.dump_data %]
 [% foo.dump_stderr %]
 [% SET foo = 1;
    foo.increment;   # foo == 2
 
Rose-DBx-Garden-Catalyst ( K/KA/KARMAN/Rose-DBx-Garden-Catalyst-0.180.tar.gz, KARMAN, 2014; MetaCPAN )
Rose-DBx-Garden-Catalyst/lib/Rose/DBx/Garden/Catalyst.pm ( view source; MetaCPAN )
py( file( $cx_crud_yui_tt_path, 'static', 'js', 'json.js' ) . '',
        file( $js_dir, 'json.js' ) . '' )
        or warn "ERROR: failed to copy json.js to local static/js\n";
    copy( file( $cx_cr
->config(
    default_view    => 'RDGC',
    fmt_to_view_map => {
        html => "RDGC",
        json => "RDGC",
        xls  => "Excel"
    },
);

1;

EOF
}

sub _make_base_rdbo_model {
    my $self
CatalystX-CRUD-YUI ( K/KA/KARMAN/CatalystX-CRUD-YUI-0.031.tar.gz, KARMAN, 2014; MetaCPAN )
CatalystX-CRUD-YUI/lib/CatalystX/CRUD/YUI/Serializer.pm ( view source; MetaCPAN )
 base 'Class::Accessor::Fast';
use MRO::Compat;
use mro "c3";
use Scalar::Util qw( blessed );
use JSON::XS ();
use Data::Dump qw( dump );

__PACKAGE__->mk_accessors(qw( datetime_format yui html_escape
RIPTION

CatalystX::CRUD::YUI::Serializer turns objects into hashrefs,
typically for rendering as JSON.
 
=head1 METHODS

Only new or overridden method are documented here.

=cut

=head2 new

Instanti
Data-Generator-FromDDL ( A/AD/ADDSICT/Data-Generator-FromDDL-0.06.tar.gz, ADDSICT, 2014; MetaCPAN )
Data-Generator-FromDDL/lib/Data/Generator/FromDDL.pm ( view source; MetaCPAN )
ch records are dumped.

=item $format (default: 'sql')

Output format. Choices are B<'sql'> or B<'json'>.

=item $pretty (default: false)

Boolean value whether to print output prettily.

=item $bytes
CatalystX-CRUD-Model-RDBO ( K/KA/KARMAN/CatalystX-CRUD-Model-RDBO-0.302.tar.gz, KARMAN, 2014; MetaCPAN )
CatalystX-CRUD-Model-RDBO/lib/CatalystX/CRUD/Object/RDBO.pm ( view source; MetaCPAN )
:CRUD::Object );

# help for serialize()
use Rose::DB::Object::Helpers qw( column_values_as_json );
use JSON;

our $VERSION = '0.302';

=head1 NAME

CatalystX::CRUD::Object::RDBO - Rose::DB::Object im
DateTime
et al objects serialized to strings.

=cut

sub serialize {
    return decode_json( column_values_as_json( shift->delegate ) );
}

1;

__END__

=head1 AUTHOR

Peter Karman, C<< <karman at cpa

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