When cmake-tools-kits.json is in an invalid state, qt-cpp cannot parse it and throws an exception. Instead, we can run cmake.scanForKits and then try to parse the corrected cmake-tools-kits.json file.
Note: This might cause the loss of some data in cmake-tools-kits.json but this is the normal behavior of cmake.scanForKits