String to Table converter | A secure way to convert string tables to table

String to Table converter

A more secure way to convert!

All you need is:

  1. a working computer (of course)
  2. require(105179105167629)(true)

How To Use

To import this converter, you can:

  1. use the source
  2. use the require

How to use the converter?
Here’s an example:

local Converter = require(105179105167629)(true)
local MyStringTable = "['foo']='bar', ['abc']=123" --or "{ ['abc']=123, ['foo']='bar'}"
print(Converter.convert(MyStringTable, "'")) --" ' " means what should script look for when looking at the values of the String Table

Probable output:

{
  ["abc"] = 123,
  ["foo"] = "bar"
}

Warning!
The converter does not support multi-leveled String Tables:
{
[“foo”] = {“bar”, 123}
}
…but the support will be added soon!

Also…
If your StringTable looks like this:
“{[‘123’] = ‘foo’, …}”
…then the string value will be omitted and transformed into a number one (‘123’ → 123)

And also…
The String Table and the Result Table differate: the Result has the values inserted from bottom to top (“{‘foo’, ‘bar’}” → {[1]=‘bar’, [2]=‘foo’})
And: I highly recommend using , instead of ; (I will add support in the future)

Again, here is the source. Hope for support and bug reports!

(by the way, the true after require disables example message)


Changelog

v.1 – 05.04.2025

  • Release

v.1.01 – 06.04.2025

  • Release №2 due to Asset ban (seems like some words in the example message were prohibited)
  • If no delimiter was passed to the converter, the converter will try and replace every single ’ with " and use it as a delimiter