etoml icon indicating copy to clipboard operation
etoml copied to clipboard

Parsing array of tables.

Open nubunto opened this issue 8 years ago • 0 comments

Hello!

First of all, thanks for all the contributors for this project. Now let me bug you guys a little bit.

Does etoml supports parsing arrays of tables? I have the following TOML:

# this is a toml file

id = "this_is_my_test"
directory = "test_scripts/"
results = "results/"



[[step]]
    info = "foo"
    [step.web]
        script = "simuterm.js"
        params = ["foo", "bar", "baz"]

[[step]]
    info = "bar"
    [step.web]
       script = "cat.js"
       params = ["can", "haz", "cheese"]

And I tried parsing it with etoml (I'm using it in a Elixir project) like:

iex> File.read!(~S(path/to/file)) |> :etoml.parse

and it gave me {:error, {:invalid_key, 9}}.

Well, 9 points to the first line of the toml where a array of tables is specified, so I'm guessing... parsing array of tables is not supported? Thanks in advance!

nubunto avatar Mar 24 '16 14:03 nubunto