Table to String, Back to Table?

Hello, I was wondering if it’s possible to go from a table to a string, and then back into a table? I’ve also tried glon, but it doesn’t work well with table.Copy. Help?


– Require the glon module.

– Make a simple table with a string, a integer and a boolean.
local myTable = { “String”, 1, true };

– this makes tableEncoded a string, which is the glon encoded table.
– Now you can do whatever you want with that string.
local tableEncoded = glon.encode(myTable);

– Now lets say you want that string back to the table.
local tableRaw = glon.decode(tableEncoded);

– tableRaw is now the same table as it was originally.

What do you mean it doesn’t work with table.Copy?

Use string.Explode and string.Implode