summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocaltidygeojson5
1 files changed, 3 insertions, 2 deletions
diff --git a/localtidygeojson b/localtidygeojson
index 49f8c6e..5e9e3c6 100755
--- a/localtidygeojson
+++ b/localtidygeojson
@@ -16,8 +16,9 @@
# 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 moreutils
+# Depends: jshon moreutils
set -eu
-jq . "$1" | perl -0 -pe 's/ /\t/g; s/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' | sponge "$1"
+jshon -SIF "$1"
+perl -0 -i -pe 's/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' "$1"