Binary Serialization - replacing Marshal on scala 2.10
问题 how can I migrate this old code to scala 2.10 since scala.util.Marshal is deprecated ? object Serilaizer{ def objectToBytes[T](foo: T)(implicit expected: ClassManifest[T]): Array[Byte] = { Marshal.dump(foo) } def bytesToObject[T](fooBytes: Array[Byte])(implicit expected: ClassManifest[T]): Option[T] = { Some(Marshal.load[T](fooBytes)) } } I saw SBinary but it is not released yet. 回答1: this is what a came up with so far , implementing the original Marshal dump/load code (as in scala 2.9), not