The Lua spec uses an imperative form which is unnecessarily verbose (it requires rewriting the table name and all indexing keys for tables and subtables. This syntax in the Lua specs does not even allow using the generated "text" with local semantics to create larger structures containing or referencing the same data.
What I suggest is something that can allow safe data-only structures (including any graph) to be serialized completely It just uses the powerful concept of closures to apply scoping rules to the existing "{}" notation, then adds a way to mark some keys or values in tables (because both can create circular links) with a reference than can be used anywhere in the data structure to reconstruct it exactly, and even embed the structure into another one without scoping problems.
Theses "variables" are even more powerful than id="" attributes in HTML (which are in a single namespace): you don't need any complex renaming scheme. Everything is already in Lua: while parsing the "{}" not only a new table is being generated, but another table is used to contain the variables in the same scope, this internal table of variables, created when you encounter the leading "{' is discarded/garbage collected when you reach the closing "}"; this internal table of variable also keeps the track (for example in its associated metatable) of the scopes of new subtables created inside.
The implementation of this is easy to do in Lua itself, but it could as well be part of its native syntax. It could also also facilititate debugging (e.g. print(table1) can dump all its content without just printing "table" and without falling into an infinite loop of self-recursions, using the same tracking technic used in the Lua specs that unfortunately generates a lengthy multiline output with many assignments and lot of redundancy)