:Random::Secure qw(random_bytes);
use MIME::Base64;
use Digest::SHA qw(sha256_base64 sha256);
use JSON;
use utf8;
use Encode;
use strict;
use Exporter;
use vars qw($VERSION);
use vars qw($VERSION @I
sh {
my ($json) = @_;
my $h;
my $js = JSON->new();
# for invalid json
$js->relaxed(1);
# convert to utf-8
$js->utf8;
eval {
# eval required for no exception if bad json
$h = $j
@_;
my $s = '';
my $js = JSON->new();
# for invalid json
$js->relaxed(1);
$js->pretty(1) if ($pretty);
eval {
# eval required for no exception if bad json
$s = $js->encode($h);