tritonmc / triton-collection-generator

Generates collection files for Triton based on other plugin's config
MIT License
3 stars 3 forks source link

Support flattened files (mainly JSON) #6

Closed diogotcorreia closed 4 years ago

diogotcorreia commented 4 years ago

Some input files might have the following input:

{
  "topLevel.key1": "value1",
  "topLevel.key2": "value2"
}

When using this tool, it outputs as:

{
  "topLevel": {
    "key1": "[lang]topLevel.key1[/lang]",
    "key2": "[lang]topLevel.key2[/lang]"
  }
}

Which is not what is supposed to.

This happens because the generator flattens and unflattens the input under-the-hood for YAML and JSON. However, it fails to preserve the original layout of the file.