diff options
-rwxr-xr-x | localtidygeojson | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/localtidygeojson b/localtidygeojson index 9cc0a1e..7dbcf7b 100755 --- a/localtidygeojson +++ b/localtidygeojson @@ -16,10 +16,10 @@ # 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: jq +# Depends: perl-modules set -eu -jq . "$1" > "$1"~ -perl -0 -i -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' "$1"~ +json_pp -json_opt pretty,canonical < "$1" > "$1"~ +perl -0 -i -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' "$1"~ mv -f "$1"~ "$1" |