1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- Builds one record and encodes it three ways, so the host can compare the bytes.
--
-- The arguments arrive in Lua's own `arg` table, which is why a shell script ported to airsl
-- reads `arg[1]` where it used to read `$1`.
local record =
local compact = airsstack..
local again = airsstack..
local pretty = airsstack..
-- Decoding returns an ordinary Lua table, so the round trip is checkable from Lua as well as from
-- the host.
local decoded = airsstack..
-- Returning a table is how a script hands the host structured output. The host reads the fields it
-- knows about; anything else is ignored rather than mis-parsed.
return