diff options
author | tv <tv@also> | 2011-07-31 04:28:45 +0200 |
---|---|---|
committer | tv <tv@also> | 2011-07-31 04:28:45 +0200 |
commit | 39802333ac524cb81298462af96b40699e47a427 (patch) | |
tree | 6d82eb3dc6e66a97cbe4bdeb43ed50ade3d41996 /json/sh/json.sh | |
parent | 4eef4e6ef8674e654a19842798914a747db1144b (diff) |
json/sh: add support for floats
Diffstat (limited to 'json/sh/json.sh')
-rwxr-xr-x | json/sh/json.sh | 2 |
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 |