Open ITR13 opened 8 months ago
Easiest way to understand the issue is the test StringTests.EscapedQuotesInAKeyAreValid:
The key string used there is "\"a.b\""
, which when passed into StringTests.EscapedQuotesInAKeyAreValid would correctly only create a single key
The problem is that the parser pre-unescapes the key to "a.b"
, which breaks the whole thing. It might be possible to have it not unescape it, and instead unescape it later, but I don't know it this breaks other code.
The parser is also unable to parse strings in the form "a.b".c or "\"a.b\"".c, which both are allowed in the toml specification. For that I can imagine two possible fixes, but I haven't looked at the parser yet and would not know of any other issues:
Fixes issue where GetTopLevelAndSubKeys splits a key when serializing. Adds test to handle new cases. Does not test cases with mixed " and ' due to issue explained in #37.