”@

Home 

python Programming Glossary: mdict

How to change json encoding behaviour for serializable python object?

http://stackoverflow.com/questions/16405969/how-to-change-json-encoding-behaviour-for-serializable-python-object

datetime.datetime return obj.isoformat elif isinstance obj mDict return 'orig' obj 'attrs' vars obj elif isinstance obj mList.. return 'orig' obj 'attrs' vars obj else return None class mDict dict pass class mList list pass def test_debug_json games mList.. mList 'mario' 'contra' 'tetris' games.src 'console' scores mDict 'dp' 10 'pk' 45 scores.processed unprocessed test_json 'games'..