Tools
Lua ↔ JSON
Turn a Lua config into JSON for a database or web dashboard, or turn JSON back into a Lua table. It also works as a quick syntax check: if your config has a missing comma or bracket, it shows you the line.
Lua
JSON
{
"Config": {
"Debug": false,
"Garages": {
"legion": {
"label": "Legion Square",
"coords": {
"x": 215.8,
"y": -810.1,
"z": 30.7,
"w": 157.5
},
"types": [
"car",
"bike"
],
"price": 250
}
}
}
}Converts data, not code: tables, strings, numbers, booleans and vector2/3/4. Functions and variables can't be turned into JSON. Lua tables with keys 1, 2, 3… become JSON arrays; anything else becomes an object.