; $type = 'json' unless $type; open my $fh, '<:encoding(utf-8)', $file or die "opening $file - $!"; my $txt = do { local $/; <$fh> }; if($type eq 'json') { require JSON; return JSON->new->deco