fix(drivers/189): decode JSON strings before parsing timestamps - #3033
Merged
Conversation
- Decode JSON time strings before normalizing Unicode spaces in both 189 drivers - Exercise escaped spaces and existing date formats through JSON unmarshalling - Cover invalid JSON input and XML time parsing Co-authored-by: Codex <267193182+codex@users.noreply.github.com> Signed-off-by: jyxjjj <16695261+jyxjjj@users.noreply.github.com>
PIKACHUIM
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Decode JSON strings before parsing timestamps in the 189pc and 189_tv drivers. JSON-escaped Unicode spaces such as
\u202fand\u00a0now reach the existing whitespace normalization as decoded characters, preventing time parsing errors for these responses.Extend regression coverage through JSON unmarshalling, including escaped spaces, invalid input, and XML compatibility. This fixes a source-level decoding gap; it has not been confirmed as the cause of the reported upload error because the original response is unavailable.
/ 此 PR 包含破坏性变更。
/ 此 PR 修改了公开 API、配置、存储格式或迁移行为。
/ 此 PR 需要关联仓库同步修改。
Related repository PRs / 关联仓库 PR: None.
Testing / 测试
Targeted tests matching
TestTimeUnmarshalpassed for 189_tv with the default checks enabled. The same tests passed for 189pc with-vet=off; the default invocation was blocked by two pre-existing non-constant format string errors in calls tofmt.Errorf. Tests cover JSON-escaped Unicode spaces, existing date formats, invalid JSON input, and XML compatibility. Formatting and whitespace checks passed. Dependency downloads were disabled during testing.Checklist / 检查清单
gofmt,go fmt, orprettierwhere applicable.AI Disclosure / AI 使用声明
Tools used / 使用工具:
Usage scope / 使用范围:
Code generation / 代码生成
Documentation / 文档
Tests / 测试
Review assistance / 审查辅助
I have reviewed and validated all AI-assisted content included in this PR.
I have ensured that all AI-assisted commits include
Co-Authored-Byattribution.I can reproduce all AI-assisted content included in this PR without any AI tools.