se Authen::SASL::SASLprep 1.100 qw/saslprep/;
use JSON::MaybeXS;
use MIME::Base64 qw/encode_base64/;
use Tie::IxHash;
use Path::Tiny;
my $JSON = JSON::MaybeXS->new( ascii => 1, canonical => 1, pretty
",
map {
$_ > 127 # if above ASCII
? sprintf( "\\u%04x", $_ ) # JSON-style escapes
: chr($_) # else as themselves
} unpack( "W*
)
{
$thash{$k} = $cred->{$k};
}
my $fname = lc "$label.json";
$fname =~ tr[ ][-];
path($fname)->spew( $JSON->encode( \%thash ) );
}
}