Hello Community,
to return data from the OnPage() method of a %CSP.Page I used to simply write out the value of a %DynamicArray e.g. via
write tResponse.%ToJSON()
and return $$$OK afterwards.
Large objects bigger than 4MB result in an exception when trying to create return values using this way. What is best practice for returning values as JSON, especially if values exceeding the capcity of the %String class are to be expected? I saw that it is possible to write data to a file with e.g.:
set tmp = tResponse.%ToJSON("/opt/home/tmp/test_stream.txt")
.png)