Re: Non string dict keys

4 views
Skip to first unread message

Eoghan Murray

unread,
Nov 22, 2009, 5:12:09 PM11/22/09
to David Aguilar, jsonp...@googlegroups.com

2009/10/24 David Aguilar <dav...@gmail.com>

I remember the dict key stuff.
At the time I wasn't interested, but maybe it'd make it easier
on you if we turned your dict keys patch into an optional feature
that could be turned on/off at en/decode time, defaulting to off?
Then your dependency would be part of the official release,
tested, etc.
 

[snip]
Let me know if you were able to port your patch to the latest
jsonpickle, it sounds useful. 


I managed to reimplement the dict_key object patch on a fork of http://github.com/davvid/jsonpickle :

http://github.com/eoghanmurray/jsonpickle

I haven't implemented it as an optional feature as it now uses a tag to flag a dict_key (so no messing with 'eval').  I don't think there is any performance or backwards incompatibility issues with this.

My patch covers any objects as dict keys - but the refs between keys and values don't work yet.

I've also taken out the test_broken_repr_dict_key test, I'm not sure what the intention of it was and if it still applies?

Eoghan
Reply all
Reply to author
Forward
0 new messages