pickling
pickling copied to clipboard
Fast, customizable, boilerplate-free pickling support for Scala
Hi, I'm trying to pickle and unpickle a ValueSet, alas without success. Here is the repl input/output: ``` scala scala> import scala.pickling._ import scala.pickling._ scala> import json._ import json._ scala>...
Spewing: ``` java.lang.RuntimeException: error: cannot find class or module with type name 'scala.Enumeration.Val' full type string: 'scala.Enumeration.Val' ```
Pickling fails to generate a pickler for case classes with variadic arguments. Here is an example that fails to compile with `Cannot generate a pickler`: ``` scala import scala.pickling._, scala.pickling.Defaults._,...
in v 0.9.1 the following works: ``` test("non-primitive array") { def testIt(x: Any): Unit = { val p = x.pickle val up = p.unpickle[Any] val arr = up.asInstanceOf[Array[(Int, Double)]] assert(arr.mkString(",")...
I've noticed that the first unpickling is very slow, whereas subsequent ones are fast. This is an issue for us in production. The following test code unpickles two objects and...
Is it possible to write a custom serializer and hook it up with pickling? For example, when one wants to serialize/deserialize ActorRefs, one has to incorporate the address part which...
Hi, I'm trying to generate a pickler for an object graph. The compilation fails after a while, suggesting to use -Xlog-implicits to see why. After adding that option, this is...
Reduced test case: ## steps (0.10.0) ``` scala package bug case class Point(x: Int, y: Int) object Test { import _root_.scala.pickling._, Defaults._ import binary._ def serialize(obj: Point): Array[Byte] = obj.pickle.value...
Scala pickling should support all the refined types but those which require reflection, i.e. structural typing. A quick example: ``` scala trait Refined { type T } implicitly[Pickler[Refined { type...
These are the times we are looking for an implicit of type `T` in the implicit search for our test suite (which, btw, is huge): | Type | Times |...