From 12813cb708b3cf897e01b7c37ef06ba6becf7e1d Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 31 Jul 2011 04:28:45 +0200 Subject: json/sh: add support for floats --- json/sh/json.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'json/sh/json.sh') diff --git a/json/sh/json.sh b/json/sh/json.sh index 8297a853..5d6476ac 100755 --- a/json/sh/json.sh +++ b/json/sh/json.sh @@ -22,7 +22,7 @@ json_to_sh() { s/\{/begin_json_object;/g; s/\}/end_json_object;/g s/("[^"]+"):/json_set_key \1;/g s/;("[^"]+")/;json_set string \1;/g - s/;([0-9]+)/;json_set number `echo -n \1 | base64`;/g + s/;([0-9.]+)/;json_set number `echo -n \1 | base64`;/g s/;;/;/g s/;/\n/g p -- cgit v1.2.3