LearnNewsExamplesServices
Frontmatter
id8258
title[Neural Link] Implement toJSON in container.Base items
stateClosed
labels
enhancementai
assigneestobiu
createdAtJan 1, 2026, 5:25 PM
updatedAtJan 1, 2026, 5:27 PM
githubUrlhttps://github.com/neomjs/neo/issues/8258
authortobiu
commentsCount1
parentIssue8200
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 1, 2026, 5:27 PM

[Neural Link] Implement toJSON in container.Base items

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Jan 1, 2026, 5:25 PM

Implement toJSON serialization for the items array in container.Base.

Strategy:

  1. Iterate over this.items.
  2. If item is NeoInstance: return id.
  3. If item is Object (Lazy Load): Stringify the module function.
  4. Keep itemCount.

Context: Avoid recursive serialization of child components. Handle lazy-load configs where module is a function. The else block for serializeConfig is likely unreachable given strictly managed items content, but we will verify this assumption.

tobiu added the enhancement label on Jan 1, 2026, 5:25 PM
tobiu added the ai label on Jan 1, 2026, 5:25 PM
tobiu added parent issue #8200 on Jan 1, 2026, 5:26 PM
tobiu assigned to @tobiu on Jan 1, 2026, 5:26 PM
tobiu referenced in commit a7edf69 - "feat(container): Implement toJSON in container.Base items #8258" on Jan 1, 2026, 5:27 PM
tobiu
tobiu Jan 1, 2026, 5:27 PM

Input from Gemini:

✦ Implemented toJSON in container.Base.

  • Iterates over items.
  • Maps NeoInstance to id.
  • Maps lazy-load objects (with function modules) to stringified functions.
  • Retains itemCount.
  • Falls back to serializeConfig for other object types.
tobiu closed this issue on Jan 1, 2026, 5:27 PM