[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Respect `-fdiagnostics-as-json` for core diagnostics (see #24113)