Skip to main content

Module json_to_lua

Module json_to_lua 

Source
Expand description

Encode serde_json::Value as a Lua expression.

Used by workflow tool consumers to inject user-supplied args into the Lua global _G._args so that workflows can read it as a regular Lua table.

Limitations:

  • JSON null becomes Lua nil.
  • JSON numbers are emitted as Rust i64/u64 when representable, otherwise as the default float formatting. Lossy beyond ~15 significant digits.
  • JSON object keys that are not valid Lua identifiers are emitted as ["key"] string-indexed entries.
  • String contents are escaped for double-quoted Lua string literals; control characters below 0x20 are emitted as \xHH.

Functionsยง

json_to_lua