diff options
author | Norbert Preining <preining@logic.at> | 2017-10-13 01:41:42 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-10-13 01:41:42 +0000 |
commit | dedef3ec4c57627762b8203d36c6469e4a5c4a95 (patch) | |
tree | f19bb55c3faa7467b1b27a5f6097a266bef5f673 /Master/tlpkg/TeXLive | |
parent | 4805e78bb8503ab861bad0e735912808345bf98a (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')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 10 |
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; |