summaryrefslogtreecommitdiffstats
path: root/json/sh/json.sh
diff options
context:
space:
mode:
authortv <tv@also>2011-07-31 04:28:45 +0200
committertv <tv@also>2011-07-31 04:28:45 +0200
commit12813cb708b3cf897e01b7c37ef06ba6becf7e1d (patch)
tree5069547500c193e9668fb8c94a874a71955b5d4d /json/sh/json.sh
parent3d4169bb993d741d66e734294afe889e0fa0d0ca (diff)
json/sh: add support for floats
Diffstat (limited to 'json/sh/json.sh')
-rwxr-xr-xjson/sh/json.sh2
1 files changed, 1 insertions, 1 deletions
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