Frontmatter
| id | 8242 |
| title | [Neural Link] Implement toJSON in data.Store |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Dec 31, 2025, 5:01 PM |
| updatedAt | Dec 31, 2025, 5:10 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8242 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8200 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 31, 2025, 5:10 PM |
[Neural Link] Implement toJSON in data.Store
tobiu added parent issue #8200 on Dec 31, 2025, 5:02 PM
tobiu assigned to @tobiu on Dec 31, 2025, 5:04 PM

tobiu
Dec 31, 2025, 5:09 PM
Input from Gemini:
✦ I have implemented the
toJSONmethod insrc/data/Store.mjs. It returns:{ ...super.toJSON(), autoInitRecords : this.autoInitRecords, autoLoad : this.autoLoad, currentPage : this.currentPage, initialChunkSize: this.initialChunkSize, isGrouped : this.isGrouped, isLoaded : this.isLoaded, isLoading : this.isLoading, model : this.model?.toJSON(), // Recursive serialization of the model pageSize : this.pageSize, remoteFilter : this.remoteFilter, remoteSort : this.remoteSort, totalCount : this.totalCount, url : this.url }Note: As with
Collection, we deliberately exclude the record data itself from this serialization to prevent performance issues with large datasets. Data inspection should usegetRecordor other specialized tools.
tobiu closed this issue on Dec 31, 2025, 5:10 PM
Implement the
toJSONmethod insrc/data/Store.mjsto support the Neural Link serialization protocol.It should return an object containing:
super.toJSON()(which includes filters, sorters, count)autoInitRecordsautoLoadcurrentPageinitialChunkSizeisGroupedisLoadedisLoadingmodel: The model class name or configpageSizeremoteFilterremoteSorttotalCounturlNote: We are NOT serializing the
dataarray here, asCollection.toJSONalready excludesitemsto avoid performance issues. Data inspection is a separate concern.