Hi, I'm working (that is trying to create a config generator for Telegraf and it uses a config file in TOML format. I tried your example for parsing the TOML file and it works perfectly, but there is an issue where some properties have angled brackets parsed into their names. Example is on picture bellow.
The code I used for this is :
<script>
$.get('nru_autogen_conf.conf', function (data) {
var config = toml.parse(data);
Object.keys(config).forEach((prop) => console.log(prop));
console.log(config["[inputs"])
});
</script>
Which just outputs all config properties.
Am I using this parser in a wrong way or is this unpredicted behavior? I would use the parser as to read the users Telegraf configuration and use the dumper to update it.
Hi, I'm working (that is trying to create a config generator for Telegraf and it uses a config file in TOML format. I tried your example for parsing the TOML file and it works perfectly, but there is an issue where some properties have angled brackets parsed into their names. Example is on picture bellow.
The code I used for this is :
Which just outputs all config properties. Am I using this parser in a wrong way or is this unpredicted behavior? I would use the parser as to read the users Telegraf configuration and use the dumper to update it.
Here is a TOML file I'm using :
If more info is needed feel free to request it 😄