strip whitespace in member arrays of json output
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 2 May 2019 00:59:52 +0000 (02:59 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 2 May 2019 01:47:47 +0000 (03:47 +0200)
getsc2clan

index 4f6bcc35fd4f5827693e3eed0156f047616bd09c..b23d2ac4f2f17443db86924791e78c3266333181 100755 (executable)
@@ -62,4 +62,4 @@ say JSON->new->canonical->pretty->encode({
                blizget(metadata => profile => 2 => 1 => $_->{id})
                # lacks mmr, fav race (available in new api)
        } @members],
                blizget(metadata => profile => 2 => 1 => $_->{id})
                # lacks mmr, fav race (available in new api)
        } @members],
-});
+}) =~ s/(?: \G \d,? | \[ ) \K \s+ (?=\d|\])/ /grx; # concat arrays of single digits