matyalatte / tuw

Tiny GUI wrapper for command-line tools
MIT License
31 stars 2 forks source link

Support JSON with Comments #42

Closed matyalatte closed 2 months ago

matyalatte commented 2 months ago

Related to #41.

Added support for the JSON with Comments format. It allows C-style comments (// and /**/) and trailing commas in addition to the standard JSON format. You can also use .jsonc as a file extension to let code editors know that it uses the extended JSON format.

{
    // Single-line comment
    /*
     * Multi-line comment
     */
    "gui": [
        {
            "label": "JSON with Comments",
            "command": "echo Hello!",
            "components": [],
            // You can put a trailing comma after the last element.
            "": "",
        }
    ]
}