Frontmatter
| id | 8238 |
| title | [Neural Link] Implement toJSON in collection.Base |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Dec 31, 2025, 4:49 PM |
| updatedAt | Dec 31, 2025, 4:57 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8238 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8200 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 31, 2025, 4:57 PM |
[Neural Link] Implement toJSON in collection.Base
tobiu added parent issue #8200 on Dec 31, 2025, 4:50 PM
tobiu assigned to @tobiu on Dec 31, 2025, 4:56 PM

tobiu
Dec 31, 2025, 4:57 PM
Input from Gemini:
✦ I have implemented the
toJSONmethod insrc/collection/Base.mjs. It returns:{ ...super.toJSON(), count : this.count, filters : this.filters.map(filter => filter.toJSON()), keyProperty: this.keyProperty, sorters : this.sorters.map(sorter => sorter.toJSON()), sourceId : this.sourceId }Important: We deliberately exclude
itemsto avoid massive payloads. Data inspection should be handled via specialized tools orgetRecordrequests. Filters and sorters are recursively serialized.
tobiu closed this issue on Dec 31, 2025, 4:57 PM
Implement the
toJSONmethod insrc/collection/Base.mjsto support the Neural Link serialization protocol.It should return an object containing:
super.toJSON()countkeyPropertysourceIdfilters(serialized viatoJSONorexport)sorters(serialized viatoJSONorexport)Decision: We will NOT serialize the full
itemsarray intoJSONto avoid performance issues with large datasets (e.g., buffered grids). Data inspection should be handled by specialized tools fetching data on demand.