feat(libSceJson2): add the sce::Json::Array copy constructor, clear, front and iterator::operator-> #3570

Merged
EdouardSence merged 1 commit from upstream-pr/3570 into main 2026-10-11 21:34:23 +00:00
EdouardSence commented 2026-10-11 13:30:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-11T13:30:13Z.


What

Adds four sce::Json::Array members to libSceJson2: the copy constructor, clear, front and iterator::operator->.

  • PPSA04540 (Rise of the Ronin, 01.009.000) imports all four (bI5AGFMydrA, qVOSuDRHCpA, zcfZQyM7eAE, iAIYn4oAWvI). On main a11c8f7f the title has 8 missing imports, and its loader stops on the first of them: ./app.elf: symbol lookup error: ./app.elf: undefined symbol: uBIN24Tv2MI (#3559). With #3559 it stops on undefined symbol: qVOSuDRHCpA (Array::clear).
  • Each one follows the members that are already there:
    • the copy constructor deep-copies like Object's;
    • clear destroys the values like Object::clear;
    • front mirrors back, and throws on an empty array as back does;
    • operator-> returns the same value as operator*.
  • guest_json checks them in ObjectsAndArrays: front, -> against *, a copy that survives clear of the original, and front on an empty array. On main the test does not link (6 undefined references).

Tested

Linux (CachyOS), RX 9070 XT, GCC, Release, on main a11c8f7f:

  • guest_json passes.
  • With this PR, #3559, #3560 and #3571 together, PPSA04540 has no missing import left. It loads and runs to its next stop, NGS2: system option flags are not implemented.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

Tested and written by Claude (AI assistant) on a contributor's machine.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4819414941 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3570). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-11T13:30:13Z. --- ### What Adds four `sce::Json::Array` members to libSceJson2: the copy constructor, `clear`, `front` and `iterator::operator->`. - PPSA04540 (Rise of the Ronin, 01.009.000) imports all four (`bI5AGFMydrA`, `qVOSuDRHCpA`, `zcfZQyM7eAE`, `iAIYn4oAWvI`). On `main` a11c8f7f the title has 8 missing imports, and its loader stops on the first of them: `./app.elf: symbol lookup error: ./app.elf: undefined symbol: uBIN24Tv2MI` (#3559). With #3559 it stops on `undefined symbol: qVOSuDRHCpA` (`Array::clear`). - Each one follows the members that are already there: - the copy constructor deep-copies like `Object`'s; - `clear` destroys the values like `Object::clear`; - `front` mirrors `back`, and throws on an empty array as `back` does; - `operator->` returns the same value as `operator*`. - `guest_json` checks them in `ObjectsAndArrays`: `front`, `->` against `*`, a copy that survives `clear` of the original, and `front` on an empty array. On `main` the test does not link (6 undefined references). ### Tested Linux (CachyOS), RX 9070 XT, GCC, Release, on `main` a11c8f7f: - `guest_json` passes. - With this PR, #3559, #3560 and #3571 together, PPSA04540 has no missing import left. It loads and runs to its next stop, `NGS2: system option flags are not implemented`. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes *Tested and written by Claude (AI assistant) on a contributor's machine.* 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-11 13:30:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T13:30:37Z.


Progress report (a11c8f7 → 3faaa4b)

📈 System libraries: 85.83% (+0.02%, +4 implemented functions)

✅ 4 implemented
Library Name
libSceJson2 _ZN3sce4Json5Array5clearEv
libSceJson2 _ZN3sce4Json5ArrayC1ERKS1_
libSceJson2 _ZNK3sce4Json5Array5frontEv
libSceJson2 _ZNK3sce4Json5Array8iteratorptEv
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109544539 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3570#issuecomment-6109544539). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T13:30:37Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 3faaa4b) 📈 **System libraries**: 85.83% (+0.02%, +4 implemented functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libSceJson2 | `_ZN3sce4Json5Array5clearEv` | | libSceJson2 | `_ZN3sce4Json5ArrayC1ERKS1_` | | libSceJson2 | `_ZNK3sce4Json5Array5frontEv` | | libSceJson2 | `_ZNK3sce4Json5Array8iteratorptEv` | </details>
adriadam10 commented 2026-10-11 21:34:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:34:12Z.


Checked build and guest_json (passes with the change; without it the test does not link), reuse of CopyArray/Destroy, and no conflicts with #3571. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114024077 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3570#issuecomment-6114024077). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:34:12Z. --- Checked build and `guest_json` (passes with the change; without it the test does not link), reuse of `CopyArray`/`Destroy`, and no conflicts with #3571. Merging.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3570
No description provided.