Group
Extension

Matches 5

Mojo-Autobox ( J/JB/JBERGER/Mojo-Autobox-0.03.tar.gz, JBERGER, 2014; MetaCPAN )
Mojo-Autobox/README.pod ( view source; MetaCPAN )
strict;
 use Mojo::Autobox;

 # "site.com\n"
 '{"html": "<a href=\"http://site.com\"></a>"}'
   ->json('/html')
   ->dom->at('a')->{href}
   ->url->host
   ->byte_stream->say;

=head1 DESCRIPTION

Usi
Mojo-Autobox ( J/JB/JBERGER/Mojo-Autobox-0.03.tar.gz, JBERGER, 2014; MetaCPAN )
Mojo-Autobox/lib/Mojo/Autobox/Hash.pm ( view source; MetaCPAN )
package Mojo::Autobox::Hash;

use Mojo::Base -strict;

sub json {
  require Mojo::JSON;
  Mojo::JSON::encode_json(shift);
}

*j = \&json;

1;

=head1 NAME

Mojo::Autobox::Hash - Autobox hash methods f
ld'}->json;

=head1 DESCRIPTION

Hash methods for L<Mojo::Autobox>. These also apply to hash references.

=head1 METHODS

=head2 json

Serializes the invocant hash using L<Mojo::JSON/encode_json> and 
returns the result.

=head2 j

An alias for L</json>.

Mojo-Autobox ( J/JB/JBERGER/Mojo-Autobox-0.03.tar.gz, JBERGER, 2014; MetaCPAN )
Mojo-Autobox/lib/Mojo/Autobox/String.pm ( view source; MetaCPAN )
}

sub json {
  require Mojo::JSON;
  require Mojo::JSON::Pointer;
  my $data = Mojo::JSON::decode_json(shift);
  return @_ ? Mojo::JSON::Pointer->new($data)->get(shift) : $data;
}

*j = \&json;

sub 
e_stream->trim;

 # "Text"
 '<p>Text</p>'->dom->at('p')->text;

 # "world"
 '{"hello": "world"}'->json->{hello};
 
 # "anchor"
 'http://mysite.com/path#anchor'->url->fragment;

=head1 DESCRIPTION

Str
ead2 json

Parses the invocant string as JSON using L<Mojo::JSON/decode_json> and returns the result.
Optionally takes a JSON pointer used to delve into the resulting structure using L<Mojo::JSON::Poi
Mojo-Autobox ( J/JB/JBERGER/Mojo-Autobox-0.03.tar.gz, JBERGER, 2014; MetaCPAN )
Mojo-Autobox/lib/Mojo/Autobox/Array.pm ( view source; MetaCPAN )
Mojo::Collection->new(@{shift()});
}

*c = \&collection;

sub json {
  require Mojo::JSON;
  Mojo::JSON::encode_json(shift);
}

*j = \&json;

1;

=head1 NAME

Mojo::Autobox::Array - Autobox array meth
x;

 # "a"
 [qw/a b c/]->collection->first;

 # '["x", "y", "z"]'
 @array = (qw/x y z/);
 @array->json;

=head1 DESCRIPTION

Array methods for L<Mojo::Autobox>. These methods also apply to array refer
Collection>, contructed from the elements of the invocant array.

=head2 json

Serializes the invocant array using L<Mojo::JSON/encode_json> and returns the result.

=head2 j

An alias for L</json>.

Mojo-Autobox ( J/JB/JBERGER/Mojo-Autobox-0.03.tar.gz, JBERGER, 2014; MetaCPAN )
Mojo-Autobox/lib/Mojo/Autobox.pm ( view source; MetaCPAN )
strict;
 use Mojo::Autobox;

 # "site.com\n"
 '{"html": "<a href=\"http://site.com\"></a>"}'
   ->json('/html')
   ->dom->at('a')->{href}
   ->url->host
   ->byte_stream->say;

=head1 DESCRIPTION

Usi

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