Skip to content

Commit

Permalink
use encode_json instead of j in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 3, 2014
1 parent 1c8029b commit 8d2fe50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -654,8 +654,8 @@ the L</"stash">.
$c->render(text => 'I ♥ Mojolicious!');
# Render binary data
use Mojo::JSON 'j';
$c->render(data => j({test => 'I ♥ Mojolicious!'}));
use Mojo::JSON 'encode_json';
$c->render(data => encode_json({test => 'I ♥ Mojolicious!'}));
# Render JSON
$c->render(json => {test => 'I ♥ Mojolicious!'});
Expand Down Expand Up @@ -817,8 +817,8 @@ status.
$c->send({json => {test => 'I ♥ Mojolicious!'}});
# Send JSON object as "Binary" message
use Mojo::JSON 'j';
$c->send({binary => j({test => 'I ♥ Mojolicious!'})});
use Mojo::JSON 'encode_json';
$c->send({binary => encode_json({test => 'I ♥ Mojolicious!'})});
# Send "Ping" frame
$c->send([1, 0, 0, 0, 9, 'Hello World!']);
Expand Down

0 comments on commit 8d2fe50

Please sign in to comment.