diff --git a/rootrdap.pl b/rootrdap.pl index 2499f60..620764b 100755 --- a/rootrdap.pl +++ b/rootrdap.pl @@ -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)); @@ -339,7 +339,7 @@ # # insert entities # - $data->{'entities'} = [ values(%{$entities}) ]; + $data->{'entities'} = [map { $entities->{$_} } sort(keys(%{$entities}))]; # # write RDAP object to disk