#!/usr/bin/env perl
use Mojolicious::Lite;
use JSON::MaybeXS qw(decode_json);

my $json = '{
  "sessions": {
    "123": { "user": "bob", "uid": 1000 }
  }
}';

my $data = decode_json($json);

get '/' => sub {
    my $c = shift;
  $c->stash(data => $data);
  $c->render(template => 'index');
};

app->start;

__DATA__

@@ index.html.ep

% my $d = stash('data');

<h1>TEST</h1>

<p>RAW dump:</p>

<pre><%==  $d->{sessions} %></pre>

<p>Direct access:</p>

<p>Whole hash (this is BAD and causes your HASH output):</p>

<pre><%= $d->{sessions} %></pre>