In one of the programs I'm trying to add TOML configuration support to it needs to convert/bind a section that sort of looks like the following JSON and YAML example.
Which suggests converting a TomlTableArray should use similar rules as converting a TomlArray, namely appending the current key with the array index of the current item.
Jagged arrays
Jagged arrays can also be supported the same way by recursively calling ProcessArray and appending current index to the full key:
JSON
In one of the programs I'm trying to add TOML configuration support to it needs to convert/bind a section that sort of looks like the following JSON and YAML example.
JSON
YAML
TOML If I understand the TOML spec correctly the above config should be defined as an array of tables like this:
Or with an inlined array of tables:
But the above example currently throws an InvalidOperationException since the ProviderDictionaryConverter doesn't support processing TomlTableArrays.
Both the JSON and YAML libraries I'm using produce the following data when converting the example:
Which suggests converting a TomlTableArray should use similar rules as converting a TomlArray, namely appending the current key with the array index of the current item.
Jagged arrays
Jagged arrays can also be supported the same way by recursively calling ProcessArray and appending current index to the full key: JSON
YAML
TOML
Produces