summaryrefslogtreecommitdiff
path: root/localtidygeojson
diff options
context:
space:
mode:
Diffstat (limited to 'localtidygeojson')
-rwxr-xr-xlocaltidygeojson7
1 files changed, 4 insertions, 3 deletions
diff --git a/localtidygeojson b/localtidygeojson
index 7a5147c..9cc0a1e 100755
--- a/localtidygeojson
+++ b/localtidygeojson
@@ -16,9 +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: jshon
+# Depends: jq
set -eu
-jshon -SIF "$1"
-perl -0 -i -pe 's/},\s*{/}, {/g; s/\[\s*([\d.,]+)\s*([\d.]+)\s*\]/[$1 $2]/g' "$1"
+jq . "$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"