Hi all,
I am currently working on a project using the Datagrid (v. 2.12.1) component. The issue I'm encountering involves uploading XML data into the grid. While the process works well for smaller files, I face a problem when uploading larger files (around 3MB with more than 2500 lines). During rendering, I encounter the following error:
Failed to deserialize JSON to ReturnMessageRec: Maximum call stack size exceeded.
Despite this error, all data appears to be loaded into the grid.
The structure that I am using has just under 50 attributes and is not nested.
I have tried using OutSystems' default serialize action as well as the datagrids ArrangeData() action. For both, I also tried requesting them through the server and having a higher time-out, but this was also not successful.
I suspected that the size of the serialized object might be causing the issue. As a workaround, I attempted to serialize the data in chunks of 1000 lines each and later combined these JSON strings. Unfortunately, this approach did not resolve the error.
I would appreciate any suggestions or strategies for resolving this issue.
Thanks a lot!
Vivianne
I imagined that was the case đ
As mentioned, AFAIK there is a limitation on the platform's JSON Serialize that presents a certain limit in terms of records to process (ArrangeData also uses this method internally so that's why you also get the error) so I can't see a good way to overcome this issue since is nothing specific to OutSystems Data Grid but to a platform system action.
Have you tried to use any alternative from Forge? Other than that I would isolate the direct usage of JSON Serialize with the amount of data that gives you the error so it can be reproduced on a support case and so it can be directed to the right team instead of passing through the Data Grid team to make it more efficient.
Cheers,GM
Hi @Vivianne Coonen
First of all, are you dealing with XML or JSON? It is unclear since you talk about XML but then you're reporting something on JSONSerialize.
Assuming we're talking about JSON, AFAIK there is a limitation on the platform's JSON Serialize that presents a certain limit in terms of records to process (ArrangeData also uses this method internally so that's why you also get the error) so I can't see a good way to overcome this issue since is nothing specific to OutSystems Data Grid but to a platform system action.
Thank you for thinking along @Gonçalo Martins
I have an XML that I assign to the structure type that I am using. Later I want to serialize that structure to JSON so I can use it for the datagrid.