#!/usr/bin/env perl
use strict;
use warnings;
use FindBin qw($RealBin);
use lib "$RealBin/../lib";
use Local::MooseJson;
chomp(my $rest_json = <<'EOJ');
{
"body_raw" : "This is Entry 1",
"url" : "http://nataraj.nataraj.hack.dreamwidth.net/459.html",
"datetime" : "2022-08-20 16:36:00",
"Surprise!" : "You didn't expect this.",
"entry_id" : 459,
"subject_html" : "Entry 1",
"poster" : {
"display_name" : "nataraj",
"username" : "nataraj"
},
"icon" : {
"url" : "http://www.nataraj.hack.dreamwidth.net/userpic/1/3",
"comment" : "4",
"picid" : 1,
"keywords" : [
"3"
],
"username" : "nataraj"
},
"subject_raw" : "Entry 1",
"body_html" : "This is Entry 1"
}
EOJ
my $mj = Local::MooseJson::->new($rest_json);
print 'Username: ', $mj->icon()->{username}, "\n";