Fails to parse. Example test case output based on above:
1) Failure:
TomlTest#test_valid_cases [test/toml_test.rb:133]:
Error: Key "a" is defined more than once in test/examples/valid/dotted-key-inline-table.toml
This succeeds in being parsed by Python and Rust implementations.
Python:
Python 3.12.5 (main, Aug 9 2024, 08:20:41) [GCC 14.2.1 20240805] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tomllib
>>> toml_str = """
... a.b = 1
... a.c = { d = 1 }
... """
>>> tomllib.loads(toml_str)
{'a': {'b': 1, 'c': {'d': 1}}}
Rust (toml v0.8.19):
fn main() {
let toml_str = r#"
a.b = 1
a.c = { d = 1 }
"#;
dbg!(toml_str.parse::<toml::Value>());
}
Example TOML:
Fails to parse. Example test case output based on above:
This succeeds in being parsed by Python and Rust implementations.
Python:
Rust (toml v0.8.19):
Outputs:
Note that in the reverse order, this library can parse successfully, i.e.