#1107642 duck: provide a JSON output

Package:
duck
Source:
duck
Submitter:
Lucas Nussbaum
Date:
2025-06-12 06:33:02 UTC
Severity:
normal
Tags:
#1107642#5
Date:
2025-06-11 06:32:38 UTC
From:
To:
Hi,

While trying to add a duck importer to UDD, I needed a way to dump URLs
and overrides out of duck. This patch implements such a dump option.

UDD uses a vendorized version of duck, so this isn't a blocker for the
importer.

Note that my perl is rusty and the patch is partially AI-generated.
So please review with care.

Also note that this only dumps the collected URLs, and does not check
the status of those URLs. So it does not fix #949855.

Lucas

#1107642#10
Date:
2025-06-12 06:31:06 UTC
From:
To:
Hi,

In the patch,

should be
my $json = JSON->new->allow_blessed->convert_blessed->pretty;

to avoid errors such as:
encountered object 'debian/monit.service', but neither allow_blessed,
convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE
method missing) at /srv/udd.debian.org/udd/vendor/duck/src/duck line
844. while processing monit

Lucas