Serialization and tagged literals EDN

18 views
Skip to first unread message

thenwithexpandedwingshesteershisflight

unread,
Oct 8, 2012, 2:22:22 AM10/8/12
to alep...@googlegroups.com
I would like to serialize form in EDN to a redis server, but I don't know how to handle types which need special handling, for example I have some PriorityMaps which I would like to be serialized with a special tag to differentiate them from regular maps, and so they can be read back in via a special handler to reconstruct them properly. How can I do that ?

Zach Tellman

unread,
Oct 8, 2012, 11:49:14 AM10/8/12
to alep...@googlegroups.com
Redis just returns strings, so you could just have the first character
describe what the rest of the body contains, and drop that character
before deserializing. There are other approaches too, obviously, but
that's one of the simplest.

Zach
Reply all
Reply to author
Forward
0 new messages