#!/usr/bin/perl use strict; use warnings; use Mojo::JSON qw(encode_json); use feature 'say'; my $bytes = encode_json{ top => 'secret' }; say $bytes;