Remove go-json-experiment dependency#680
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the third-party github.com/go-json-experiment/json dependency, refactoring the JSONLFormatter to manually construct JSON lines using the standard library's encoding/json and updating query profile structs to use json.RawMessage. The reviewer feedback advises against this change, recommending that jsontext.Encoder be retained and reused to ensure efficient streaming, avoid repeated allocations, and guarantee column order preservation in the JSONL output.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Code Metrics Report📊 View detailed coverage report (available for 7 days)
Details | | main (800eb51) | #680 (1883d6b) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 70.2% | 70.2% | +0.0% |
| Files | 84 | 84 | 0 |
| Lines | 7497 | 7517 | +20 |
+ | Covered | 5263 | 5281 | +18 |
- | Code to Test Ratio | 1:1.2 | 1:1.2 | -0.1 |
| Code | 17253 | 17283 | +30 |
+ | Test | 22302 | 22323 | +21 |
+ | Test Execution Time | 1m36s | 50s | -46s |Code coverage of files in pull request scope (24.7% → 35.1%)
Reported by octocov |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request removes the external dependency github.com/go-json-experiment/json and refactors the codebase to use the standard library's encoding/json package. Specifically, JSONLFormatter is updated to use json.Encoder with HTML escaping disabled (SetEscapeHTML(false)) to ensure HTML-sensitive characters are preserved in the JSONL output. It also manually formats JSON objects to preserve column order and validates raw JSON cells using json.Valid. Additionally, queryProfiles and rawQueryProfiles are updated to use json.RawMessage instead of jsontext.Value. Unit tests have been added to verify HTML-sensitive character handling and invalid raw JSON error reporting. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary:
Future encoding/json/v2 plan:
Validation: