Group
Extension

Matches 35359

ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/API.pm ( view source; MetaCPAN )
ixtures.json' )
  {
    eval { require Data::Properties::JSON };
    $test_data = Data::Properties::JSON->new(
      properties_file => $config->web->application_root . '/etc/test_fixtures.json'
    )
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/Result/ProcessInstance.pm ( view source; MetaCPAN )
date({ workflow_instance_id => $rel->id });

    $guard->commit;

    return $self;
    }

sub TO_JSON {
    my $self = shift;
    my $fields = {
        map { $_ => $self->$_() } 
            qw/inst
ocess_id instance_name created completed/
        };
    # $fields->{attributes} = [ map { $_->TO_JSON } $self->attributes_rs->all ];
    return $fields;
    }

__PACKAGE__->meta->make_immutable( inli
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Util/ExpressionEvaluator.pm ( view source; MetaCPAN )
 = sub { $args{$param}->TO_JSON; } };
        eval { $params->{$param} = delete($args{$param})->TO_JSON; };
        if($@) {
            throw_param error => "Could not jsonize $param: $@";
          
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/Result.pm ( view source; MetaCPAN )
 $val = $self->next::method(@args);
    return bless $val, 'BPM::Engine::DateTime';
    }

sub TO_JSON {
    my($self, $level) = @_;

    my %parms = map { $_ => $self->$_ } grep { $self->$_ }
       
);

## no critic (ProhibitMultiplePackages)
{
package BPM::Engine::DateTime;

use strict;
use warnings;
use parent 'DateTime';

sub TO_JSON {
    my $dt = shift; 
    return "$dt";
    }
}

1;
__END__
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/Result/Participant.pm ( view source; MetaCPAN )
       data_type         => 'TEXT',
        is_nullable       => 1,
        serializer_class  => 'JSON',
        },
    );

__PACKAGE__->set_primary_key(qw/participant_id/);


__PACKAGE__->might_have(
ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/ConfigFinder.pm ( view source; MetaCPAN )
ConfigFinder;

use strict;
use warnings 'all';
use Cwd 'fastcwd';

our $CONFIGFILE = 'asp4-config.json';


sub config_path
{
  my $path = $CONFIGFILE;
  
  my $root = do { ($ENV{REMOTE_ADDR} || '') eq
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/ResultSet/Package.pm ( view source; MetaCPAN )
 my $field = (keys %{$type})[0];
        my ($multi, $single) = @{ $type->{$field} };
        my $json = '';
        #warn "Storing field $field multi $multi single $single type $type container $conta
 {
            $json = delete $args->{$multi};
            my @event_types = keys %{$json};
            next unless scalar @event_types;
            $json = scalar @event_types ? $json->{$event_types[
 && $args->{$multi}->{$single}) {
            $json = delete $args->{$multi}->{$single};
            delete $args->{$multi};
            next unless $json->[0];
            # get rid of XML::LibXML::E
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/Result/ActivityInstanceSplit.pm ( view source; MetaCPAN )
       data_type         => 'TEXT',
        is_nullable       => 1,
        serializer_class  => 'JSON',
        },    
    );

__PACKAGE__->set_primary_key(qw/ split_id /);

__PACKAGE__->belongs_to(
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/ResultRole/WithAttributes.pm ( view source; MetaCPAN )
sor role for ProcessInstance and ActivityInstance

use namespace::autoclean;
use Moose::Role;
use JSON;
use BPM::Engine::Util::ExpressionEvaluator;
use BPM::Engine::Exceptions qw/throw_store throw_par
lue));

        $init->{ScriptType} ||= '';
        if($init->{ScriptType} eq 'json') {
            $ivalue = decode_json($ivalue);
            }
        else {
            $ivalue = $expr->render($iv
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/Result/Process.pm ( view source; MetaCPAN )
      serializer_class  => 'JSON',
        },
    formal_params => {
        data_type         => 'TEXT',
        is_nullable       => 1,
        serializer_class  => 'JSON',
        },
    assignment
      serializer_class  => 'JSON',
        },
    extended_attr => {
        data_type         => 'TEXT',
        is_nullable       => 1,
        serializer_class  => 'JSON',
        },
    created =>
{process_name} ||= $attrs->{process_uid};

    return $class->next::method($attrs);
    }

sub TO_JSON {
    my $self = shift;

    my %params = map { $_ => $self->$_ } grep { $self->$_ }
        qw/p
Catalyst-Authentication-Store-KiokuDB ( R/RB/RBERJON/Catalyst-Authentication-Store-KiokuDB-0.03.tar.gz, RBERJON, 2012; MetaCPAN )
Catalyst-Authentication-Store-KiokuDB/lib/Catalyst/Authentication/User/KiokuDB.pm ( view source; MetaCPAN )
les => (
    isa         => 'ArrayRef',
    is          => 'rw',
    auto_deref  => 1,
);

sub TO_JSON {
    my $self = shift;
    my %ret;
    for my $k (qw/id username password crypted_password hash
WWW-SEOmoz ( A/AJ/AJCT/WWW-SEOmoz-0.02.tar.gz, AJCT, 2012; MetaCPAN )
WWW-SEOmoz/lib/WWW/SEOmoz.pm ( view source; MetaCPAN )
z;


use Moose;
use namespace::autoclean;

use LWP::UserAgent;
use DateTime;
use URI::Escape;
use JSON;
use Carp        qw( croak );
use Digest::SHA qw( hmac_sha1_base64 );

use WWW::SEOmoz::URLMetric
uired';

    my $res = $self->ua->get( $url );

    if ( $res->is_success ) {
        return from_json $res->content;
    }

    croak $res->content;

}


sub url_metrics {
    my $self = shift;
    m
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/Result/Transition.pm ( view source; MetaCPAN )

        #size              => 255,
        is_nullable       => 1,
        serializer_class  => 'JSON',
        },    
    class => {
        data_type         => 'VARCHAR',
        size             
IPC-Transit ( D/DI/DIEDERICH/IPC-Transit-0.3.tar.gz, DIEDERICH, 2012; MetaCPAN )
IPC-Transit/lib/IPC/Transit/Test/Example.pm ( view source; MetaCPAN )
ransit::Test::Example;

use strict;use warnings;
use Data::Dumper;
use IPC::Transit;
use POE;
use JSON;
use File::Slurp;

sub
import {
    my $self = shift;
    my ($callpack, $callfile, $callline) = 
utes.json') or die "get_routes: routes.json not found\n";
    my $routes;
    eval {
        $routes = decode_json($routes_text) or die "returned false\n";
    };
    die "get_routes: decode_json() fa
ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4.pm ( view source; MetaCPAN )
n and save 
it to the database.

=head2 $Config

The ASP4 C<$Config> object is stored in a simple JSON format on disk, and accessible
everywhere within your entire ASP4 application as the global C<$Co
ample project to get things going.

In the C<data_connections.main> section of C<conf/asp4-config.json> you should have
something like this:

  ...
    "main": {
      "dsn":              "DBI:mysql:d
BPM-Engine ( S/SI/SITETECH/BPM-Engine-0.01.tar.gz, SITETECH, 2012; MetaCPAN )
BPM-Engine/lib/BPM/Engine/Store/Result/Activity.pm ( view source; MetaCPAN )
       serializer_class  => 'JSON',
        },
    data_fields => {
        data_type         => 'TEXT',
        is_nullable       => 1,
        serializer_class  => 'JSON',
        },
    input_sets 
       serializer_class  => 'JSON',
        },
    output_sets => {
        data_type         => 'TEXT',
        is_nullable       => 1,
        serializer_class  => 'JSON',
        },    
    assignm
    serializer_class  => 'JSON',
        },    
    extended_attr => {
        data_type         => 'TEXT',
        is_nullable       => 1,
        serializer_class  => 'JSON',
        },    
    );

ASP4 ( J/JO/JOHND/ASP4-1.087.tar.gz, JOHND, 2012; MetaCPAN )
ASP4/lib/ASP4/Error.pm ( view source; MetaCPAN )

package ASP4::Error;

use strict;
use warnings 'all';
use ASP4::HTTPContext;
use JSON::XS;


sub new
{
  my $class = shift;
  my ($err_str, %args);
  if( @_ )
  {
    if( @_ == 1 )
    {
      $err_s
{stacktrace},
    code          => $code,
    form_data     => encode_json($Form) || "{}",
    session_data  => eval { encode_json(\%session_data) } || "{}",
    http_referer  => $ENV{HTTP_REFERER},
 
acktrace

A string - defaults to the value of C<$@>.

=head2 form_data

JSON-encoded C<$Form> object.

=head2 session_data

JSON-encoded C<$Session> object.

=head2 http_referer

Default value is C<$E
MooseX-POE ( G/GE/GETTY/MooseX-POE-0.215.tar.gz, GETTY, 2012; MetaCPAN )
MooseX-POE/ex/tbray/tbray_poe_workers.pl ( view source; MetaCPAN )
b} <=> $count->{$a} } keys %$count;
    };

}

{

    package Count;
    use MooseX::POE;
    use JSON::Any qw(XS);
    with qw(MooseX::Workers);

    my $rx = qr|GET /ongoing/When/\d\d\dx/(\d\d\d\d/\
nk) {
                    $count->{$1}++ if $line =~ $rx;
                }
                print JSON::Any->encode(
                    { sender => $sender->ID, count => $count } );
            }
   
r => 'loop' );
    };

    sub worker_stdout {
        my ( $self, $out ) = @_;
        my $msg = JSON::Any->decode($out);
        POE::Kernel->post( $msg->{sender} => 'inc' => $msg->{count} );
    }
Parse-FieldPath ( P/PB/PBOYD/Parse-FieldPath-0.005.tar.gz, PBOYD, 2012; MetaCPAN )
Parse-FieldPath/lib/Parse/FieldPath.pm ( view source; MetaCPAN )
=> Cow::Teeth->new,
  );

And you want a hash containing some of those fields (perhaps to pass to
JSON::XS, or something). Then you can do this:

  use Parse::FieldPath qw/extract_fields/;

  my $cow_
JSTAPd ( Y/YA/YAPPO/JSTAPd-0.03.tar.gz, YAPPO, 2012; MetaCPAN )
JSTAPd/lib/JSTAPd/Manual/Test.pod ( view source; MetaCPAN )
s'
  }

The return value can be any Perl construct. If it's a reference, the return value will be JSON encoded. Otherwise it will be passed as-is.

The C<server_api()> function takes the following par

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