paiden / Nett

.Net library for TOML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TomlTableWriter does not escape Keys properly.

pragmatrix opened this issue · comments

commented

According to the TOML specification, BareKeys may contain dots (.) and if they do, the key needs to be quoted.

The parser seems to take in quoted keys as expected, but TomlTableWriter does not escape them and generates invalid TOML files.

For example:

"a.value" = 0

is written as

a.value = 0
commented

I've tried the current master, even table names like ['a.b'.c] are properly written. Nice work and thank you for that.