The parser descends recursively into every array and object without a
limit, so deeply nested input exhausts the stack and crashes the
process: 50000 levels on an 8 MB main thread and 5000 levels (10 KB of
brackets) on a 256 KB thread. sce::Json::Parser::parse now returns
JsonErrorParse when a document opens more than 512 nested arrays or
objects, which bounds the recursion for any input.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb
sce::Json::Value::getBoolean, getInteger, getUInteger and getReal return const references
(const bool&, const long&, const unsigned long&, const double&), so the guest reads the value
through the returned pointer. A value-returning implementation made callers dereference the value
itself. Cross-type conversions keep main's range rules and are stored on the node so the reference
stays valid.
Value::referValue(const String&) looks a member up without creating it: it returns null for a
missing key or a value that is not an object instead of inserting an entry or throwing.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ButHENCbXXt8h4EZuWUabJ