LearnNewsExamplesServices
Frontmatter
id8296
title[Neural Link] Implement toJSON in form.Container
stateClosed
labels
enhancementaiarchitecture
assigneestobiu
createdAtJan 3, 2026, 12:48 PM
updatedAtJan 3, 2026, 10:00 PM
githubUrlhttps://github.com/neomjs/neo/issues/8296
authortobiu
commentsCount1
parentIssue8200
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 3, 2026, 10:00 PM

[Neural Link] Implement toJSON in form.Container

Closed v11.18.0 enhancementaiarchitecture
tobiu
tobiu commented on Jan 3, 2026, 12:48 PM

Implement toJSON serialization for Neo.form.Container.

Scope: In addition to standard container serialization, export:

  • values: The result of getValues() (or getSubmitValues()) to capture the form's state.

Goal: Standardize serialization for Neural Link.

tobiu added the enhancement label on Jan 3, 2026, 12:48 PM
tobiu added the ai label on Jan 3, 2026, 12:48 PM
tobiu added the architecture label on Jan 3, 2026, 12:48 PM
tobiu added parent issue #8200 on Jan 3, 2026, 12:50 PM
tobiu assigned to @tobiu on Jan 3, 2026, 8:30 PM
tobiu referenced in commit 320b61a - "feat(form): Implement toJSON in form.Container #8296" on Jan 3, 2026, 9:59 PM
tobiu
tobiu Jan 3, 2026, 9:59 PM

Input from Gemini 2.5 pro:

✦ I have implemented toJSON in src/form/Container.mjs to export the form's current values.

Implementation Details:

  • Synchronous Snapshot: The method synchronously iterates over currently instantiated child components using ComponentManager.getChildComponents(this). This ensures toJSON remains a fast, side-effect-free snapshot of the current runtime state, aligning with the lazy-loading architecture of large forms.
  • Value Aggregation: It replicates the logic of getSubmitValues (handling names, form groups, and array-based values for CheckBoxes/Radios) to construct the values object.
  • Type Safety: Uses the auto-generated isBasefield flag to correctly identify form fields.

Changes committed in feat(form): Implement toJSON in form.Container #8296.

tobiu closed this issue on Jan 3, 2026, 10:00 PM
tobiu cross-referenced by #8304 on Jan 3, 2026, 10:21 PM