Python
22 Apr 2010
 
 
 
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
class Raw(str): pass
class MyJSONEncoder(JSONEncoder):
def _iterencode(self, o, markers=None):
if isinstance(o, Raw):
yield o
else:
for chunk in JSONEncoder._iterencode(self, o, markers):
yield chunk
def default(self, o):
return Raw("new StrannayaHuinya(111)")