feat(libSceJson2): implement typed construction, indexed and keyed value access, InitParameter2 #369
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/369"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by tv7 on 2026-10-02T15:56:12Z.
What
Nine
libSceJson2exports that had no definition onmain:Value::Value(ValueType)constructs a value of the given type.Value::getValue(size_t)andValue::getValue(const String&)return the element or member, or the null-access result when it is missing, asoperator[]does.Value::referValue(size_t)returns the mutable array element, or null when the value is not an array or the index is out of range, asreferValue(const String&)does for members.Object::sizereturns the member count.InitParameter2(the class form ofInitParameter): the constructor zeroes it,setAllocatorandsetFileBufferSizerecord their arguments, andInitializer::initialize(const InitParameter2*)succeeds asinitialize(const InitParameter*)does. The layout stays within the 40 bytes a title reserves for it on the stack.guest_jsongains a test covering each of them: construction of every type, keyed and indexed reads including missing members and out-of-range indices, writing throughreferValue(size_t), and the recordedInitParameter2fields.Tested
ctest, 107/107 passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-04T05:33:33Z.
Progress report (
481c85e→fcd349f)📈 System libraries: 82.36% (+0.05%, +9 implemented functions)
✅ 9 implemented
_ZN3sce4Json11Initializer10initializeEPKNS0_14InitParameter2E_ZN3sce4Json14InitParameter212setAllocatorEPNS0_12MemAllocatorEPv_ZN3sce4Json14InitParameter217setFileBufferSizeEm_ZN3sce4Json14InitParameter2C1Ev_ZN3sce4Json5Value10referValueEm_ZN3sce4Json5ValueC1ENS0_9ValueTypeE_ZNK3sce4Json5Value8getValueERKNS0_6StringE_ZNK3sce4Json5Value8getValueEm_ZNK3sce4Json6Object4sizeEvImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T05:43:17Z.
Thanks for these. Two things before it can go in. It no longer merges into current main:
libSceJson2/Export.cppconflicts with the nesting limit and the Cyberpunk exports that landed since, so it needs a rebase. And theInitParameter2layout (allocator, user data, file buffer size) is inferred rather than known, so could you add a line for it under "Unknown function info" indocs/dev/TechnicalDebt.md, the way the other assumed layouts are recorded? The accessors themselves look right to me.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-04T23:45:06Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)_ZN3sce4Json11Initializer10initializeEPKNS0_14InitParameter2E_ZN3sce4Json14InitParameter217setFileBufferSizeEm_ZN3sce4Json11Initializer10initializeEPKNS0_14InitParameter2E_ZN3sce4Json14InitParameter217setFileBufferSizeEmdocs/dev/TechnicalDebt.mdL134docs/dev/TechnicalDebt.mdL134docs/dev/TechnicalDebt.mdL134Imported from boykopovar/AnyPS5. Originally posted by tv7 on 2026-10-05T15:57:35Z.
Thanks for the review, both are done:
sceJson2Unknown00stub at the end oflibSceJson2/Export.cpp; both are kept. The nesting limit and Cyberpunk exports merged cleanly. Full build and all 288 ctest tests pass locally.InitParameter2layout under "Unknown function info" indocs/dev/TechnicalDebt.md(separate commit d22180d).The CI runs for the new head are waiting for workflow approval.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T05:34:05Z.
Thanks, both points are done: the rebase keeps the
sceJson2Unknown00stub next to your exports, and theInitParameter2layout is recorded under "Unknown function info".Since then, main has added four lines at the end of that list (
_sceUlobjmgrRegisterObject,sceShareGetCurrentStatus,sceAgcDcbSet*PredicationEnableGetSizeandResource registration), sodocs/dev/TechnicalDebt.mdconflicts again. Keeping those and adding your line after them resolves it.On #407: it still declares
sce::Json::Initializer::initializeandInitParameter2::setFileBufferSizeas throwing stubs. I've asked there for them to be dropped, since this PR implements both.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T09:27:50Z.
Thanks, the rebase is exactly that: main's lines at the end of "Unknown function info" are kept, your
InitParameter2line follows them, and the code commit is unchanged. It merges cleanly with main now.