Reads a file in the current working directory or a String as a plain text TOML file. The returned object is a normal Map with String keys or a List of primitives or Map.

Example:

def props = readTOML file: 'dir/input.toml'
assert props['attr1'] == 'One'
assert props.attr1 == 'One'

def props = readTOML text: 'key = "value"'
assert props['key'] == 'value'
assert props.key == 'value'

def props = readTOML text: 'a = [ "a", "b" ]'
assert props.a[0] == 'a'
assert props.a[1] == 'b'

def props = readTOML text: 'a.b.c = 1\n[key]\nvalue = ""'
assert props['key'].value == ""
assert props.a.b.c == 1
props.each { key, value ->
    echo "Walked through key $key and value $value"
}