TOML.print NamedTuple

(a = 2, b = 3) is a named tuple and from the error message it is clear that TOML doesn’t support that. The easiest solution is probably to pass a Dict instead:

data = Dict(“settings” => Dict("a" => 2, "b" => 3)))

or if your data was already given as named tuple, the slightly more obscure

data = Dict(“settings” => pairs((a = 2, b = 3)))
1 Like