Closed Laserlicht closed 9 months ago
No idea myself, not exactly familiar with workflows. Perhaps @rilian-la-te has any ideas?
BTW - we might also want to do the same for referenced mod.json's on daily basis - I've seen some error messages in Launcher because of format issues in mod.json which gets downloaded on repository checkout.
e.g. simply feed JSONs to python / ruby parser and check for error
but if the plan is to check JSONs that have comments / allow commas after last element, custom parser would be needed
to check JSONs that have comments
Perhaps we can strip them with sed
or some other similar tool before feeding to validator?
allow commas after last element
We don't exactly allow that - yes, our parser can read such json's, but it will still issue a warning
Perhaps we can strip them with
sed
or some other similar tool before feeding to validator?
yes, that would work
@kambala-decapitator we can use this python utility for stripping comments: https://pypi.org/project/JSON_minify/
It do it automatically.
@rilian-la-te even better :)
Btw Android suffers from comments and commas) So this issue is quite important there
Can i join with you guys ...? We can able to create JSON action validator in GitHub workflow easily like my basic repository If you want please tell me the file that you are going to validate the json file ......
Is that your github.json file .....?
We should introduce a GitHub-Workflow that check the JSON files in this repo if they are valid when changing files.
See problem here: https://github.com/vcmi/vcmi-mods-repository/pull/14
@IvanSavenko @kambala-decapitator Do any of you know how to do this?