pickling
pickling copied to clipboard
Pickle a class where on field is enum
Hi, the enums are not serialized nicely. The most-specific type of the enum is not in the pickled version and the information about which value from the enumeration was pickled is completely missing.
"source": {
"tpe": "Enumeration.this.Val"
}
It would be nice, if you'd look at it.
Just a note to let you know that this is not forgotten, but that it probably won't come in the 0.8.0 release. Instead, it'll probably be handled in the 0.8.1 release which should come shortly after 0.8.0 (a matter of days/weeks most likely).
OK, thanks for noticing
Any update on this?
+1
+1
+1
+1
+9000
9000?! There's no way that can be right! It can't!
But, seriously, +1.
+1
Hey guys, this turns out to be part of a class of bugs relating to Java .class
files and the scala symbol loader. We'll have to add very specific support for enum
in the future. For now you HAVE to provide custom Pickler/Unpickler for these types.
In fact, in 0.11.x we'll no longer allow a pickler to be generated by the macros because we know our information about Java classes is suspect.
Oh, and also I should check: Is this a java enum or a Scala enum?
@jsuereth - I'm primarily interested in scala.Enumeration
values.
+1 scala.Enumeration does anybody have a working example of a custom un/pickler ?
+1 Scala enum
👍
+1
👍
+1