luadata handles all Lua data types and converts them to their JSON equivalents.
name = "Anduin"
level = 70
health = 98.5
active = true
guild = nil
{
"name": "Anduin",
"level": 70,
"health": 98.5,
"active": true,
"guild": null
}
The type mapping is straightforward:
Lua strings become JSON strings. Integers and floats become JSON numbers. Booleans map directly. Lua nil becomes JSON null.
luadata also supports negative numbers, scientific notation (like 1.5e-3), and strings with escape sequences.
Want more flexibility? Open the interactive converter to try any Lua input with all available options.