1

I am using play framework 2 with Scala. From the controller I have a action method from where I need to return an object containing 100000 rows with some other data. But during JSON serialization it gets an exception at org.json4s.native.Serialization.write(Serialization.scala:37)

it seems it can not handle that amount of data volume. Can the set the size somewhere? or what is the solution of it?

1 Answers1

1

Chunked response can be used to send large dataset, especially the total bytes length is not known when starting sending a response. It only consumes a small amount of memory because it streams data chunk by chunk.

https://www.playframework.com/documentation/2.5.x/ScalaStream#chunked-responses

kawty
  • 1,656
  • 15
  • 22