what exactly are you doing? the compile_commands.json isn't really meant to be hand-written, it's best generated from your build system (make, cmake) which already knows all the commands and flags etc.
i know, im using cmake, could you just confirm to me whetever cmake can export the compile_commands.json with msvc or just with ninja and make? apparently it doesn't work with msvc