Group
Extension

Matches 3

Cikl ( F/FA/FALTER/Cikl-0.5.1.tar.gz, FALTER, 2014; MetaCPAN )
Cikl/lib/Cikl/Codecs/JSON.pm ( view source; MetaCPAN )
ackage Cikl::Codecs::JSON;

use strict;
use warnings;
use Cikl::Models::Event;
require JSON::XS;
use Mouse;
use Cikl::Codecs::CodecRole;
use namespace::autoclean;

our $JSON = JSON::XS->new()->utf8(1)
ion/json";
}

sub encode_event {
  my $self = shift;
  my $event = shift;
  return $JSON->encode($event->to_hash());
}

sub decode_event {
  my $self = shift;
  my $json = shift;
  my $data = $JSON->d
ecode($json);
  return Cikl::Models::Event->from_hash($data);
}

__PACKAGE__->meta->make_immutable;

1;
Cikl ( F/FA/FALTER/Cikl-0.5.1.tar.gz, FALTER, 2014; MetaCPAN )
Cikl/lib/Cikl/Smrt/Parsers/ParseJson.pm ( view source; MetaCPAN )
t::Parsers::ParseJson;

use strict;
use warnings;

use JSON::XS;
use Mouse;
use Cikl::Smrt::Parser;
extends 'Cikl::Smrt::Parser';
use namespace::autoclean;

use constant NAME => 'json';
sub name { ret
  }
      }
      $broker->emit($h);
    };

    $self->_parse_json_as_stream($fh, $cb);
    return(undef);
}

# This will parse the JSON as a stream, which uses significantly less memory 
# than read
h this, we have to strip off the '[' and ']' that we
# expect to surround the main JSON array in order to get the JSON lib to emit
# individual objects. We must also remove any commas that appear betw
Cikl ( F/FA/FALTER/Cikl-0.5.1.tar.gz, FALTER, 2014; MetaCPAN )
Cikl/lib/Cikl/Client/Transport.pm ( view source; MetaCPAN )
;
use Scalar::Util qw(blessed);
use Cikl::Codecs::JSON;
use namespace::autoclean;

has 'codec' => (
  is => 'ro',
  default => sub { Cikl::Codecs::JSON->new() } 
);

has 'running' => (
  is => 'rw',
 

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