diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-08-09 02:56:49 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-08-09 02:56:49 +0200 |
| commit | b6197cc1c5ca7632a604f354f8a2d7274b25f308 (patch) | |
| tree | 64c12976d0d11e71360359b2ba05ca4feacef937 /tests/json.lua | |
| parent | 7e927d46915646c7c219f6a57df5569bee9d78f8 (diff) | |
| download | bidi-b6197cc1c5ca7632a604f354f8a2d7274b25f308.tar.gz | |
Fixed button definitions and refactor
Diffstat (limited to 'tests/json.lua')
| -rw-r--r-- | tests/json.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/json.lua b/tests/json.lua new file mode 100644 index 0000000..a659889 --- /dev/null +++ b/tests/json.lua | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | local file = io.open("tests/test.json", "r") | ||
| 2 | local content = file:read("*a") | ||
| 3 | file:close() | ||
| 4 | |||
| 5 | local data = json.decode(content) | ||
| 6 | |||
| 7 | print("name: " .. data.name) | ||
| 8 | for _, n in pairs(data.numbers) do | ||
| 9 | print(" - number: " .. n) | ||
| 10 | end | ||
