diff options
author | Jonas Smedegaard <dr@jones.dk> | 2014-01-12 21:14:38 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2014-01-12 21:14:38 +0100 |
commit | a993c7d66f66af964772f23af6b3a9e7fb814a4b (patch) | |
tree | 5286a2b3879e845fece0db3a14eb974e2a746c8c | |
parent | 2644211898a7b36f0568a80a1d9c3c84b82e84c2 (diff) |
Fix use jq as tidier (json_xs randomly shuffles data).
-rwxr-xr-x | localtidygeojson | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/localtidygeojson b/localtidygeojson index 23d95c5..49f8c6e 100755 --- a/localtidygeojson +++ b/localtidygeojson @@ -16,8 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # -# Depends: libjson-xs-perl moreutils +# Depends: jq moreutils set -eu -json_xs < "$1" | perl -0 -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' | sponge "$1" +jq . "$1" | perl -0 -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' | sponge "$1" |