summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPOBJ.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-10-13 01:41:42 +0000
committerNorbert Preining <preining@logic.at>2017-10-13 01:41:42 +0000
commitdedef3ec4c57627762b8203d36c6469e4a5c4a95 (patch)
treef19bb55c3faa7467b1b27a5f6097a266bef5f673 /Master/tlpkg/TeXLive/TLPOBJ.pm
parent4805e78bb8503ab861bad0e735912808345bf98a (diff)
tlmgr info: allow for --data json
git-svn-id: svn://tug.org/texlive/trunk@45530 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index d7a9d795e30..9e91daa25ad 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -420,6 +420,16 @@ sub writeout_simple {
}
}
+sub as_json {
+ my $self = shift;
+ require JSON;
+ #my $json = JSON::PP->new->utf8;
+ my %foo = %{$self};
+ my $utf8_encoded_json_text = JSON::encode_json(\%foo); # $json->encode(\%foo);
+ return $utf8_encoded_json_text;
+}
+
+
sub cancel_reloc_prefix {
my $self = shift;
my @docfiles = $self->docfiles;