Open schradert opened 1 week ago
Okay I figured out that it does work if the contents are structured as an array:
[
{
"title": "chiaki-ng",
"target": "chiaki",
"startIn": "./",
"launchOptions": "",
"appendArgsToExecutable": true
}
]
So, the FAQ is not accurate.
Also it looks like it does matter that files have a .json
extension.
So, the FAQ is not accurate.
Now that I've reviewed this closer, I understand what's happening. I wasn't careful enough with how I reported the bug. Technically the contents of my chiaki.manifest.json
in the failing scenario was:
{
"appendArgsToExecutable": true,
"launchOptions": "",
"startIn": "./",
"target": "chiaki",
"title": "chiaki-ng"
}
I am generating JSON dynamically and by default it orders keys alphabetically. This matters because the parser only checks the value type of the first key. The parser will work correctly as long as the first key is a string in the top-level object case, which I have now tested successfully.
Maybe I'm the only one ever who will encounter this error, but I guess you never know. I can easily see someone doing the same thing I did or even manually ordering the fields by preference. This situation can be easily avoided by just forcing jsonObj
to be an array if it isn't, and the code would be less fragile and cleaner IMHO.
I can't get my Manual type parser to find my programs. I just says no apps found. I am specifying a Manifests Directory which exists and only has JSON files in it, each of which contains the config for a single title with all the specified fields in the manual entry: title, target, startIn, launchOptions, and appendArgsToExecutable. Can I show more verbose logging somehow? Anybody experienced this?
chiaki.manifest.json
file in it with the following contents:This should find the config file and add the program!
Upvote & Fund