diff options
Diffstat (limited to 'tests/json2lua.lua')
-rwxr-xr-x | tests/json2lua.lua | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/json2lua.lua b/tests/json2lua.lua deleted file mode 100755 index 050b89d..0000000 --- a/tests/json2lua.lua +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #!/usr/bin/env lua | ||
2 | |||
3 | -- usage: json2lua.lua [json_file] | ||
4 | -- | ||
5 | -- Eg: | ||
6 | -- echo '[ "testing" ]' | ./json2lua.lua | ||
7 | -- ./json2lua.lua test.json | ||
8 | |||
9 | local json = require "cjson" | ||
10 | local misc = require "cjson-misc" | ||
11 | |||
12 | local json_text = misc.file_load(arg[1]) | ||
13 | local t = json.decode(json_text) | ||
14 | print(misc.serialise_value(t)) | ||