scala/pickling

Some of the constructer parameters could not be serialized

concerned3rdparty opened this issue · 2 comments

When i try to json pickle an instance of this class (using this line: cls.pickleTo(....) ),
N, timeWindow and lastN parameters do not show up in the result.No problem with other parameters .Any tips for this problem ?

class CluStream(dimC:Int, dimD:Int, NC:Int, ND:Int, N:Int, threshold:Double, timeWindow:Double, lastN:Int, uniqueLabelCount:Int=1){
........
}

Closing because the provided information is not useful and does not state what your problem is. Could you perhaps add more concrete information and code snippets to figure out how we can help you?

Actually, sorry, I've been a quite harsh before. I finally figured out what you mean. PR #435 shows how this example is compiling for latest 0.11.x, which Heather is about to publish. If this new version doesn't fix this problem, it probably comes from the way you're serializing/deserializing. Either your custom picklers and unpicklers don't take care of serializing those fields (in case you create your own custom picklers and unpicklers), or your example uses the pickler/unpickler of a super class at runtime (you should avoid this, try to always generate picklers/unpicklers statically, see import static._). In any case, there's something weird going on and I don't know if it's scala pickling's fault (older versions) or you missing something in your code.

If I haven't understood your problem correctly, @concerned3rdparty, please give me some more info and I'll try to help.