Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization with ignore  RSS feed

 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to write object and some of parent objects are not serializable, then the operation fails. In my case I do not care about restoring object which are not serializable, however I do not have much control to make them transient. Does somebody has an example of serialization object with ignoring not serializable parts? Generally I need that for a map, so if some entries can't be stored, I want just exclude them.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
D,
As far as I know, you can only make class members transient -- you cannot make super classes transient. Perhaps you should change the design of your class such that it uses composition and not inheritance?

Good Luck,
Avi.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!