mirror of
https://github.com/webmin/webmin.git
synced 2026-06-01 18:50:26 +01:00
Merge branch 'master' of github.com:webmin/webmin
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -10840,6 +10840,25 @@ else {
|
||||
}
|
||||
}
|
||||
|
||||
=head2 convert_from_json(data)
|
||||
|
||||
Parses given JSON string
|
||||
|
||||
=item data parameter is encoded JSON string
|
||||
|
||||
=cut
|
||||
sub convert_from_json
|
||||
{
|
||||
eval "use JSON::PP";
|
||||
if (!$@) {
|
||||
my ($json_text) = @_;
|
||||
return JSON::PP->new->utf8->decode($json_text);
|
||||
}
|
||||
else {
|
||||
error("The JSON::PP Perl module is not available on your system : $@");
|
||||
}
|
||||
}
|
||||
|
||||
=head2 print_json(data)
|
||||
|
||||
Prints JSON data
|
||||
|
||||
Reference in New Issue
Block a user