Repository: pantsbuild/pants

Issue:
IncompleteJSONError when running any pants commands
**Describe the bug**
I'm adding pants to an existing repo with go code. My initial `pants tailor ::` worked and generated BUILD files, but now running any commands including `pants check ::` will generate the following error:
```
  IncompleteJSONError: parse error: trailing garbage
          mod", 	"GoVersion": "1.19" } { 	"Path": "cloud.google.com/go
                     (right here) ------^
```

**Pants version**
2.14.0

**OS**
MacOS (Ventura)

**Additional info**
My local python version used by pants is `3.9.13` and I'm building my project on Go `1.19`. 

Here's a gist which contains the full output from running with `ldebug` and `print-stacktrace`: https://gist.github.com/jcrumb-u21/d3b575ae2b7a8ac2060c2409a0b73171

Here's a gist containing my project's `go.mod`: https://gist.github.com/jcrumb-u21/8ef02939c226bd9eca27314ecf16f99f

And finally, here's a gist of the JSON output that `go list` is generating, pulled from `pants.backend.go.util_rules.third_party_pkg.analyze_module_dependencies`: https://gist.github.com/jcrumb-u21/9c4f36108689722921dfd179e2013bd8



Discussion:
FWIW if I load that `go list` output in a Python REPL then `ijson.items` can iterate it no problem.
(And the above is true when the input is a `str` and when it is a `bytes`)
Does the problem persist if you use Pants v2.16.0.dev2? 

I used that `go.mod` with a basic `main.go` (with just `func main() {}`) and running `./pants check` succeeded. I also ran it with Pants 2.14.0 and Python 3.9.15 and it succeeded.

`ijson` has multiple parser backends. If you run a Python REPL, what is the value of `ijson.backend`? (My installation is using the default Python-based parser.)
How does a JSON parser have backends! Yeesh...

```
>>> ijson.backend
'python'
```
I get `yajl2` as my backend. Explicitly specifying the python backend (`import ijson.backends.python as ijson`) in both `third_party_pkg.py` and `import_analysis.py` resolves the error. 
Aha!  Good sleuthing. Could you send a PR with that change? 

Resolving patch:
diff --git a/src/python/pants/backend/go/util_rules/import_analysis.py b/src/python/pants/backend/go/util_rules/import_analysis.py
--- a/src/python/pants/backend/go/util_rules/import_analysis.py
+++ b/src/python/pants/backend/go/util_rules/import_analysis.py
@@ -7,7 +7,7 @@
 from dataclasses import dataclass
 from typing import ClassVar
 
-import ijson
+import ijson.backends.python as ijson
 
 from pants.backend.go.util_rules.build_opts import GoBuildOptions
 from pants.backend.go.util_rules.sdk import GoSdkProcess
diff --git a/src/python/pants/backend/go/util_rules/third_party_pkg.py b/src/python/pants/backend/go/util_rules/third_party_pkg.py
--- a/src/python/pants/backend/go/util_rules/third_party_pkg.py
+++ b/src/python/pants/backend/go/util_rules/third_party_pkg.py
@@ -10,7 +10,7 @@
 from dataclasses import dataclass
 from typing import Any
 
-import ijson
+import ijson.backends.python as ijson
 
 from pants.backend.go.go_sources.load_go_binary import LoadedGoBinary, LoadedGoBinaryRequest
 from pants.backend.go.util_rules import pkg_analyzer


Test patch: