import boopickle.shapeless.Default._
val session = ??? // some case class
val buffer = Pickle.intoBytes(session)
val bytes = buffer.array // throws UnsupportedOperationException
Is that just "how it works" in Scalajs - I have no way of accessing these bytes? Or am I doing something wrong?
The idea is to serialize some session data into bytes which I can later send to the server.
Is there a way around it? Can the pickler return an array of bytes instead of ByteBuffer?
Hey, working on Scalajs 1 with boopickle 1.4.0.
Is that just "how it works" in Scalajs - I have no way of accessing these bytes? Or am I doing something wrong? The idea is to serialize some session data into bytes which I can later send to the server.
Is there a way around it? Can the pickler return an array of bytes instead of ByteBuffer?
Looking at scala.js source code that error is thrown if array is null.