summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPOBJ.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm12
1 files changed, 3 insertions, 9 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 8dadf1723fd..82eaf531ce4 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -423,8 +423,6 @@ sub writeout_simple {
sub as_json {
my $self = shift;
my %addargs = @_;
- require JSON;
- #my $json = JSON::PP->new->utf8;
my %foo = %{$self};
# set the additional args
for my $k (keys %addargs) {
@@ -445,9 +443,9 @@ sub as_json {
# encode boolean as boolean flags
if (exists($foo{'relocated'})) {
if ($foo{'relocated'}) {
- $foo{'relocated'} = $JSON::true;
+ $foo{'relocated'} = TeXLive::TLUtils::True();
} else {
- $foo{'relocated'} = $JSON::false;
+ $foo{'relocated'} = TeXLive::TLUtils::False();
}
}
# adjust the docfiles entry to the specification in JSON-formats
@@ -469,11 +467,7 @@ sub as_json {
$foo{'docfiles'} = [ @newdocf ];
delete($foo{'docfiledata'});
#
- # my home-made solution is a bit faster then JSON::PP
- # but we still prefer that one for security ;-)
- # If JSON::XS is installed, that is the fastest.
- #my $utf8_encoded_json_text = TeXLive::TLUtils::hash_to_json(\%foo);
- my $utf8_encoded_json_text = JSON::encode_json(\%foo);
+ my $utf8_encoded_json_text = TeXLive::TLUtils::encode_json(\%foo);
return $utf8_encoded_json_text;
}