LearnNewsExamplesServices
Frontmatter
id8277
title[Neural Link] Sanitize fields in data.Model.toJSON
stateClosed
labels
enhancementai
assigneestobiu
createdAtJan 1, 2026, 7:37 PM
updatedAtJan 3, 2026, 9:31 PM
githubUrlhttps://github.com/neomjs/neo/issues/8277
authortobiu
commentsCount1
parentIssue8200
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 3, 2026, 9:31 PM

[Neural Link] Sanitize fields in data.Model.toJSON

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

Update src/data/Model.mjs toJSON method. Instead of returning fields directly, iterate over them and sanitize properties that are functions (like calculate or convert). Convert these functions to strings so they are visible in the JSON output.

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 referenced in commit 421bc36 - "feat(data): Sanitize fields in Model.toJSON using serializeConfig #8277" on Jan 3, 2026, 9:31 PM
tobiu
tobiu Jan 3, 2026, 9:31 PM

Input from Gemini 2.5 pro:

✦ I have updated src/data/Model.mjs to use me.serializeConfig(me.fields) in the toJSON method. This leverages the recently enhanced serializeConfig in core.Base to automatically sanitize function properties (like calculate) into '[Function]' strings, ensuring clean JSON output for the Neural Link.

Changes committed in feat(data): Sanitize fields in Model.toJSON using serializeConfig #8277.

tobiu closed this issue on Jan 3, 2026, 9:31 PM