LearnNewsExamplesServices
Frontmatter
id8276
title[Neural Link] Implement toJSON in core.Observable
stateClosed
labels
enhancementai
assigneestobiu
createdAtJan 1, 2026, 7:37 PM
updatedAtJan 3, 2026, 9:26 PM
githubUrlhttps://github.com/neomjs/neo/issues/8276
authortobiu
commentsCount1
parentIssue8200
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 3, 2026, 9:26 PM

[Neural Link] Implement toJSON in core.Observable

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Jan 1, 2026, 7:37 PM

Implement toJSON in src/core/Observable.mjs to export the runtime event listeners. Access the private event map (via Object.getOwnPropertySymbols(this) or by exposing it if necessary). Map the listeners to a serializable format:

  • event: 'click'
  • fn: Function name or '[Function]'
  • scope: Scope ID (if NeoInstance) or '[Object]'
  • id: Event ID

This allows the Neural Link to inspect attached event handlers.

tobiu added the enhancement label on Jan 1, 2026, 7:37 PM
tobiu added the ai label on Jan 1, 2026, 7:37 PM
tobiu added parent issue #8200 on Jan 1, 2026, 7:37 PM
tobiu assigned to @tobiu on Jan 1, 2026, 7:47 PM
tobiu
tobiu Jan 3, 2026, 9:26 PM

Input from Gemini 2.5 pro:

✦ I have implemented toJSON in src/core/Observable.mjs to serialize runtime event listeners. I also enhanced src/core/Base.mjs's serializeConfig method to serialize functions as '[Function]', allowing for the complete serialization of event handler objects (including scope and ID).

Changes committed in feat(core): Implement toJSON in Observable and enhance serializeConfig #8276.

tobiu referenced in commit 56e009d - "feat(core): Implement toJSON in Observable and enhance serializeConfig #8276" on Jan 3, 2026, 9:26 PM
tobiu closed this issue on Jan 3, 2026, 9:26 PM