X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=3c12569a2aa261667687fdfb9ca12da9746ffbe0;hp=9cc82e318fd3b79d617c2128ac3418647a8ce35c;hb=d39bafd9fb4cc0725786ab815bf7dd5fb03ef15e;hpb=a8bb0ee3a3de2402a55b38c408c32c35b0ae3e12 diff --git a/remoteglot.pl b/remoteglot.pl index 9cc82e3..3c12569 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -774,7 +774,9 @@ sub output_json { } $json->{'refutation_lines'} = \%refutation_lines; - my $encoded = JSON::XS::encode_json($json); + my $json_enc = JSON::XS->new; + $json_enc->canonical(1); + my $encoded = $json_enc->encode($json); unless ($historic_json_only || !defined($remoteglotconf::json_output) || (defined($last_written_json) && $last_written_json eq $encoded)) { atomic_set_contents($remoteglotconf::json_output, $encoded);