Best way to serialize filter sets?

3 views
Skip to first unread message

Dave Briccetti

unread,
Sep 22, 2009, 5:49:48 PM9/22/09
to TalkingPuffin
Hi all. Filter settings are stored in a FilterSet:

http://github.com/dcbriccetti/talking-puffin/blob/master/desktop/src/main/scala/org/talkingpuffin/filter/FilterSet.scala

but not persisted so that the filters are in effect again when you
restart tpuf.

Persisted preferences are saved using java.util.prefs.Preferences
(thanks, Bill Robertson, or whoever it was who suggested that).

I want to allow users to create multiple FilterSets, so I need a
simple way to persist them. Ideas: serialize to JSON or XML and store
as a string in java.util.prefs.Preferences.

There’s also the issue of backward compatibility as we add more
elements to FilterSet.

Your thoughts, please?
Reply all
Reply to author
Forward
0 new messages