Skip to content

Commit

Permalink
more Mojo::JSON examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 11, 2013
1 parent fceaa39 commit 1d0ab87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Mojo/JSON.pm
Expand Up @@ -385,6 +385,7 @@ L<Mojo::JSON> implements the following functions.
=head2 j
my $bytes = j([1, 2, 3]);
my $bytes = j({foo => 'bar'});
my $array = j($bytes);
my $hash = j($bytes);
Expand Down Expand Up @@ -417,6 +418,7 @@ Decode JSON to Perl data structure and return C<undef> if decoding fails.
=head2 encode
my $bytes = $json->encode([1, 2, 3]);
my $bytes = $json->encode({foo => 'bar'});
Encode Perl data structure to JSON.
Expand Down

0 comments on commit 1d0ab87

Please sign in to comment.