mirror of
https://github.com/krateng/maloja.git
synced 2025-04-26 13:12:11 +03:00
8 lines
197 B
Python
8 lines
197 B
Python
from simplejson import JSONEncoder
|
|
|
|
def newdefault(self,object):
|
|
return getattr(object.__class__,"__json__", olddefault)(object)
|
|
|
|
olddefault = JSONEncoder.default
|
|
JSONEncoder.default = newdefault
|