Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Pickle a class where on field is enum #17

Open
ryskajakub opened this issue Sep 3, 2013 · 19 comments
Open

Pickle a class where on field is enum #17

ryskajakub opened this issue Sep 3, 2013 · 19 comments

Comments

@ryskajakub
Copy link

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.

@heathermiller
Copy link
Member

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).

@ryskajakub
Copy link
Author

OK, thanks for noticing

@vovagalchenko
Copy link

Any update on this?

@dtarima
Copy link

dtarima commented Aug 28, 2014

+1

1 similar comment
@shumn
Copy link

shumn commented Sep 5, 2014

+1

@reid-spencer
Copy link

+1

1 similar comment
@dodnert
Copy link

dodnert commented Jul 17, 2015

+1

@danoctavian
Copy link

+9000

@jewer
Copy link

jewer commented Jul 21, 2015

9000?! There's no way that can be right! It can't!

But, seriously, +1.

@chaorace
Copy link

+1

@jsuereth
Copy link
Contributor

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.

@jsuereth
Copy link
Contributor

Oh, and also I should check: Is this a java enum or a Scala enum?

@dodnert
Copy link

dodnert commented Aug 13, 2015

@jsuereth - I'm primarily interested in scala.Enumeration values.

@webgress
Copy link

+1 scala.Enumeration
does anybody have a working example of a custom un/pickler ?

@pabloa
Copy link

pabloa commented Jun 9, 2016

+1 Scala enum

@schickling
Copy link

👍

3 similar comments
@Keshi
Copy link

Keshi commented Jul 20, 2016

+1

@oskoi
Copy link

oskoi commented Nov 20, 2016

👍

@bbarn3y
Copy link

bbarn3y commented Jan 4, 2017

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests