data-wellformed's message for a 100000-deep JSON file depends on the Python build ("malformed JSON" vs "Expecting value")

未关闭
#290 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
data

调研方向

Start in ecosystems/data.py at _parse_json, which calls json.loads and falls back to the non-recursive check_json only on RecursionError. Reproduce with n_structure_100000_opening_arrays.json and n_structure_open_array_object.json from the JSONTestSuite corpus under two recursion limits. Done when one message is produced regardless of the limit, and the corpus expectations are updated to match.

由索引模型根据 Issue 内容生成。

描述

ecosystems/data.py::_parse_json tries json.loads first and falls back to the non-recursive check_json only on RecursionError. For the JSON test-suite files n_structure_100000_opening_arrays.json and n_structure_open_array_object.json (denoland/std jsonc/testdata/JSONTestSuite/, ocaml-community/yojson test/compliance/test_cases/), json.loads raises RecursionError on one machine (→ check_json → "1:100001: malformed JSON") and JSONDecodeError("Expecting value") on another (the GitHub runner, Python 3.14.10 → "1:100001: Expecting value" / "2:1: Expecting value"), so the corpus expectations for the two projects differ between the first local recording and the first CI run (corpus PR).

Expected: one message whatever the recursion limit, e.g. always parse with check_json (or report the C decoder's position only when it agrees with the non-recursive checker). The corpus records the runner's wording for now.

Found by the regression corpus's first CI run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

主要语言
Python
星标
4
派生
1
平均合并
10 小时 41 分钟
30 天内合并 PR
79

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cpp-best-practices/project_validator 的其他 Issue

查看 cpp-best-practices/project_validator 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。