parameters: (o)
docstring: 将对象转化为能直接json_encode的对象
docstring_summary: 将对象转化为能直接json_encode的对象
docstring_tokens: 将对象转化为能直接json_encode的对象
function: def jsonable(o):
      """ 将对象转化为能直接json_encode的对象
      """
      if isinstance(o, dict):
          d = {}
          for key in o:
              d[key] = jsonable(o[key])
          return d
      elif type(o) in [list, tuple]:
          li = []
          for i, item in enumerate(o):
              li.append(jsonable(item))
          return li
      elif type(o) in [str, unicode, NoneType, bool, int, long, float]:
          return o
      elif type(o) == datetime:
          return time.mktime(o.timetuple())
      elif isinstance(o, Model):
          return o.dict()
      else:
          raise Exception('cant jsonable')
function_tokens: def jsonable ( o ) : if isinstance ( o , dict ) : d = { } for key in o : d [ key ] = jsonable ( o [ key ] ) return d elif type ( o ) in [ list , tuple ] : li = [ ] for i , item in enumerate ( o ) : li . append ( jsonable ( item ) ) return li elif type ( o ) in [ str , unicode , NoneType , bool , int , long , float ] : return o elif type ( o ) == datetime : return time . mktime ( o . timetuple ( ) ) elif isinstance ( o , Model ) : return o . dict ( ) else : raise Exception ( 'cant jsonable' )