Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
canonicalise JSON output and sort entities deterministically so we ge…
Browse files Browse the repository at this point in the history
…t smaller diffs
  • Loading branch information
gbxyz committed Jul 26, 2023
1 parent f2c69e2 commit 2969887
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rootrdap.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

my $ua = LWP::UserAgent->new('agent' => sprintf('%s/%s', basename(__FILE__, '.pl'), $VERSION));

my $json = JSON->new->pretty;
my $json = JSON->new->pretty->canonical;

my $list = join('/', $dir, basename(TLD_LIST));

Expand Down Expand Up @@ -339,7 +339,7 @@
#
# insert entities
#
$data->{'entities'} = [ values(%{$entities}) ];
$data->{'entities'} = [map { $entities->{$_} } sort(keys(%{$entities}))];

#
# write RDAP object to disk
Expand Down

0 comments on commit 2969887

Please sign in to comment.