LearnNewsExamplesServices
Frontmatter
id8200
title[Neural Link] Implement toJSON Serialization Protocol
stateClosed
labels
epicaiarchitecture
assigneestobiu
createdAtDec 29, 2025, 8:10 AM
updatedAtJan 5, 2026, 5:05 PM
githubUrlhttps://github.com/neomjs/neo/issues/8200
authortobiu
commentsCount0
parentIssuenull
subIssues
8224 [Neural Link] Implement toJSON in core.Base
8226 [Neural Link] Implement toJSON in component.Abstract
8225 [Neural Link] Implement toJSON in component.Base
8227 [Neural Link] Implement toJSON in button.Base
8228 [Neural Link] Implement toJSON in container.Base
8232 [Neural Link] Implement toJSON in state.Provider
8233 [Neural Link] Implement toJSON in layout.Base
8234 [Neural Link] Implement toJSON in layout.Flexbox
8235 [Neural Link] Implement toJSON in layout.Card
8236 [Neural Link] Implement toJSON in layout.Form
8237 [Neural Link] Implement toJSON in layout.Cube
8238 [Neural Link] Implement toJSON in collection.Base
8239 [Neural Link] Implement toJSON in collection.Filter
8240 [Neural Link] Implement toJSON in collection.Sorter
8241 [Neural Link] Implement toJSON in data.Model
8242 [Neural Link] Implement toJSON in data.Store
8243 [Neural Link] Implement toJSON in grid.column.Base
8244 [Neural Link] Implement toJSON in grid.column subclasses
8245 [Neural Link] Implement toJSON in grid.column.Currency
8246 [Neural Link] Implement toJSON in grid.column.AnimatedChange
8247 [Neural Link] Implement toJSON in grid.column.AnimatedCurrency
8248 [Neural Link] Implement toJSON in grid.column.Progress
8249 [Neural Link] Implement toJSON in grid.Container
8251 [Neural Link] Implement toJSON in toolbar.Base
8252 [Neural Link] Implement toJSON in grid.header.Toolbar
8253 [Neural Link] Implement toJSON in grid.ScrollManager
8254 [Neural Link] Implement toJSON in grid.header.Button
8255 [Neural Link] Implement toJSON in grid.Body
8256 [Neural Link] Implement toJSON in component.Base (add role)
8257 [Neural Link] Implement toJSON in grid.Container (add body, headerToolbar, scrollManager)
8258 [Neural Link] Implement toJSON in container.Base items
8259 [Neural Link] Implement toJSON in selection.Model
8260 [Neural Link] Implement toJSON in selection.DateSelectorModel
8261 [Neural Link] Implement toJSON in selection.GalleryModel
8262 [Neural Link] Implement toJSON in selection.HelixModel
8263 [Neural Link] Implement toJSON in selection.grid.BaseModel
8264 [Neural Link] Implement toJSON in selection.grid.CellColumnModel
8265 [Neural Link] Implement toJSON in selection.grid.CellColumnRowModel
8266 [Neural Link] Implement toJSON in selection.table.CellColumnModel
8267 [Neural Link] Implement toJSON in selection.table.CellRowModel
8268 [Neural Link] Implement toJSON in selection.table.CellColumnRowModel
8269 [Neural Link] Implement toJSON in manager.DragCoordinator
8270 [Neural Link] Implement toJSON in manager.Window
8275 [Neural Link] Export controller in component.Base.toJSON
8276 [Neural Link] Implement toJSON in core.Observable
8277 [Neural Link] Sanitize fields in data.Model.toJSON
8289 [Neural Link] Implement toJSON in form.field.Base
8290 [Neural Link] Implement toJSON in form.field.Text
8291 [Neural Link] Implement toJSON in form.field.Number
8292 [Neural Link] Implement toJSON in form.field.CheckBox
8293 [Neural Link] Implement toJSON in form.field.Radio
8294 [Neural Link] Implement toJSON in form.field.Date
8295 [Neural Link] Implement toJSON in form.field.trigger.Base
8296 [Neural Link] Implement toJSON in form.Container
8297 [Neural Link] Implement toJSON in component.Base (add keys)
8298 [Neural Link] Implement toJSON in form.field.Picker
8299 [Neural Link] Fix missing align config in component.Base.toJSON
8300 [Neural Link] Implement toJSON in form.field.trigger.SpinUpDown
8301 [Neural Link] Implement toJSON in util.KeyNavigation
8302 [Neural Link] Enhance core.Base.serializeConfig to handle Neo Instances
8303 [Neural Link] Implement toJSON for AmChart and Monaco
8304 [Neural Link] Deep Value Collection for form.Container.toJSON
8335 Fix toJSON mixin shadowing and implement dynamic mixin serialization
subIssuesCompleted63
subIssuesTotal63
blockedBy[]
blocking[]
closedAtJan 5, 2026, 5:05 PM

[Neural Link] Implement toJSON Serialization Protocol

Closed v11.18.0 epicaiarchitecture
tobiu
tobiu commented on Dec 29, 2025, 8:10 AM

Objective: Standardize how Neo.mjs instances are serialized for AI inspection (Neural Link). Currently, the Neural Link Client manually picks properties, which is brittle and unscalable. We will implement a toJSON() method protocol across the framework.

Core Concept: Every class decides its own JSON representation. JSON.stringify(instance) automatically calls toJSON().

Plan:

  1. Phase 1: Foundation (core.Base, component.Base)

    • Implement toJSON() in core.Base: Export id, className, ntype.
    • Implement toJSON() in component.Base: Export key layout/visibility props (width, height, hidden, style, disabled).
    • Optimization: Ensure toJSON is non-recursive by default for complex object references to prevent circular dependency crashes and performance bottlenecks.
  2. Phase 2: Common Widgets

    • Implement toJSON() for high-value components: Button (text, iconCls), Label (text), Container (layout).
  3. Phase 3: Data & State

    • Implement toJSON() for data.Model (already exists? verify/standardize).
    • Implement toJSON() for data.Store (summary vs full dump).
  4. Phase 4: Client Integration

    • Update NeuralLink_ComponentService (and others) to simply call instance.toJSON() instead of manually constructing objects.

Discussion Point:

  • Tree vs. Detail: getComponentTree might need a "lightweight" serialization (just ID/ntype) vs getComponentProperty or queryComponent returning the "full" toJSON. We might need toJSON(detailLevel) or separate methods. For now, toJSON should be the "Detail View".

Value:

  • Robustness: No more Client.mjs updates when a component adds a new config.
  • Standardization: Uses native JS patterns.
  • Scalability: Distributes the maintenance load to component authors.
tobiu added the epic label on Dec 29, 2025, 8:10 AM
tobiu added the ai label on Dec 29, 2025, 8:10 AM
tobiu added the architecture label on Dec 29, 2025, 8:10 AM
tobiu assigned to @tobiu on Dec 29, 2025, 8:11 AM
tobiu added sub-issue #8224 on Dec 31, 2025, 1:42 PM
tobiu added sub-issue #8226 on Dec 31, 2025, 1:46 PM
tobiu added sub-issue #8225 on Dec 31, 2025, 2:23 PM
tobiu added sub-issue #8227 on Dec 31, 2025, 2:30 PM
tobiu added sub-issue #8228 on Dec 31, 2025, 2:45 PM
tobiu added sub-issue #8232 on Dec 31, 2025, 4:08 PM
tobiu referenced in commit 665b841 - "docs(issue): Update ticket state for #8200 and #8232" on Dec 31, 2025, 4:11 PM
tobiu added sub-issue #8233 on Dec 31, 2025, 4:14 PM
tobiu added sub-issue #8234 on Dec 31, 2025, 4:18 PM
tobiu added sub-issue #8235 on Dec 31, 2025, 4:22 PM
tobiu added sub-issue #8236 on Dec 31, 2025, 4:39 PM
tobiu added sub-issue #8237 on Dec 31, 2025, 4:42 PM
tobiu added sub-issue #8238 on Dec 31, 2025, 4:50 PM
tobiu added sub-issue #8239 on Dec 31, 2025, 4:50 PM
tobiu added sub-issue #8240 on Dec 31, 2025, 4:50 PM
tobiu added sub-issue #8241 on Dec 31, 2025, 5:01 PM
tobiu added sub-issue #8242 on Dec 31, 2025, 5:02 PM
tobiu referenced in commit 3aa70f1 - "#8200 method order, this => me where applicable" on Dec 31, 2025, 5:33 PM
tobiu added sub-issue #8243 on Jan 1, 2026, 3:30 AM
tobiu added sub-issue #8244 on Jan 1, 2026, 3:36 AM
tobiu added sub-issue #8245 on Jan 1, 2026, 3:56 AM
tobiu added sub-issue #8246 on Jan 1, 2026, 3:56 AM
tobiu added sub-issue #8247 on Jan 1, 2026, 3:57 AM
tobiu added sub-issue #8248 on Jan 1, 2026, 3:57 AM
tobiu added sub-issue #8249 on Jan 1, 2026, 4:17 AM
tobiu added sub-issue #8251 on Jan 1, 2026, 4:14 PM
tobiu added sub-issue #8252 on Jan 1, 2026, 4:24 PM
tobiu added sub-issue #8253 on Jan 1, 2026, 4:26 PM
tobiu added sub-issue #8254 on Jan 1, 2026, 4:34 PM
tobiu added sub-issue #8255 on Jan 1, 2026, 4:36 PM
tobiu added sub-issue #8256 on Jan 1, 2026, 4:40 PM
tobiu added sub-issue #8257 on Jan 1, 2026, 4:43 PM
tobiu added sub-issue #8258 on Jan 1, 2026, 5:26 PM
tobiu cross-referenced by #8259 on Jan 1, 2026, 5:47 PM
tobiu cross-referenced by #8260 on Jan 1, 2026, 5:49 PM
tobiu cross-referenced by #8261 on Jan 1, 2026, 5:49 PM
tobiu cross-referenced by #8262 on Jan 1, 2026, 5:49 PM
tobiu added sub-issue #8259 on Jan 1, 2026, 5:52 PM
tobiu added sub-issue #8260 on Jan 1, 2026, 5:52 PM
tobiu added sub-issue #8261 on Jan 1, 2026, 5:53 PM
tobiu added sub-issue #8262 on Jan 1, 2026, 5:53 PM
tobiu cross-referenced by #8263 on Jan 1, 2026, 5:53 PM
tobiu added sub-issue #8263 on Jan 1, 2026, 5:56 PM
tobiu cross-referenced by #8264 on Jan 1, 2026, 5:56 PM
tobiu cross-referenced by #8265 on Jan 1, 2026, 5:56 PM
tobiu added sub-issue #8264 on Jan 1, 2026, 5:57 PM