qbit
(
M/MA/MADSKILL/qbit-2.8.tar.gz, MADSKILL, 2018;
MetaCPAN
)
package Exception::BadArguments::InvalidJSON;
$Exception::BadArguments::InvalidJSON::VERSION = '2.8';
use base qw(Exception::BadArguments);
=head1 Name
qbit::StringUtils - Functions to manipulate st
use JSON::XS ();
use POSIX qw(locale_h);
BEGIN {
our (@EXPORT, @EXPORT_OK);
@EXPORT = qw(
html_encode html_decode uri_escape check_email idn_to_unicode get_domain to_json from_json for
e {
return;
}
}
=head2 to_json
B<Arguments:>
=over
=item
B<$data> - scalar.
=back
B<Return value:> string, C<$data> as JSON.
=cut
sub to_json($;%) {
my ($data, %opts) = @_;