Group
Extension

Matches 4

Nile ( M/ME/MEWSOFT/Nile-0.55.tar.gz, MEWSOFT, 2014; MetaCPAN )
Nile/lib/Nile/Serialization.pm ( view source; MetaCPAN )
~~~~
=head2 Json
    
    $json = $app->freeze->Json;
    $encoded = $json->utf8->encode($data);

Returns L<JSON> object.

=cut

has 'Json' => (
      is      => 'rw',
      isa    => 'JSON',
      la
zy  => 1,
      default => sub {
          load JSON;
          JSON->new;
      }
  );

=head2 Yaml
    
    $yaml = $app->freeze->Yaml;

Returns L<YAML> object.

=cut

has 'Yaml' => (
      is      
efault => sub {
          load YAML;
          YAML->new;
      }
  );

=head2 Storable
    
    $json = $app->freeze->Storable;

Returns "Storable" string. L<Storable> deos not suppot new method.

=c
Nile ( M/ME/MEWSOFT/Nile-0.55.tar.gz, MEWSOFT, 2014; MetaCPAN )
Nile/lib/Nile/Deserializer.pm ( view source; MetaCPAN )


Nile::Deserializer - Data structures deserializer

=head1 SYNOPSIS
    
    $data = $app->thaw->json($encoded);
    $data = $app->thaw->yaml($encoded);
    $data = $app->thaw->storable($encoded);
  
l($encoded);

    # also deserialize method is an alias for freeze
    $data = $app->deserialize->json($encoded);

=head1 DESCRIPTION

Nile::Deserializer - Data structures deserializer

=cut

use Nile
~~~~~~~~~~~~~~~~~
=head2 json()
    
    $encoded = qq!{"lname":"elsheshtawy","fname":"ahmed","phone":{"home":"02222444","mobile":"012222333"}}!;

    $data = $app->thaw->json($encoded);

    # return
Nile ( M/ME/MEWSOFT/Nile-0.55.tar.gz, MEWSOFT, 2014; MetaCPAN )
Nile/lib/Nile/App.pm ( view source; MetaCPAN )
type_text {
    my ($self, $content_type) = @_;
    return $content_type =~ /(\bx(?:ht)?ml\b|text|json|javascript)/;
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub result 
Nile ( M/ME/MEWSOFT/Nile-0.55.tar.gz, MEWSOFT, 2014; MetaCPAN )
Nile/lib/Nile/Serializer.pm ( view source; MetaCPAN )
me=>"elsheshtawy", phone=>{mobile=>"012222333", home=>"02222444"}};

    $encoded = $app->freeze->json($data);
    $encoded = $app->freeze->yaml($data);
    $encoded = $app->freeze->storable($data);
 
->xml($data);

    # also serialize method is an alias for freeze
    $encoded = $app->serialize->json($data);

=head1 DESCRIPTION

Nile::Serializer - Data structures Serializer

=cut

#use Nile::Base
~~~~~~~~~~~~~~~~~
=head2 json()
    
    $data = {fname=>"ahmed", lname=>"elsheshtawy", phone=>{mobile=>"012222333", home=>"02222444"}};
    
    $encoded = $app->freeze->json($data);

    # returns:

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