示例#1
0
文件: base.py 项目: martyanov/changes
def _as_json(context):
    try:
        return json.dumps(context)
    except TypeError:
        logging.warning(
            "unable to json-encode api response. Was the data not serialized?")
        return json.dumps(serialize_func(context))
示例#2
0
文件: base.py 项目: simudream/changes
def _as_json(context):
    try:
        return json.dumps(context)
    except TypeError:
        logging.warning(
            "unable to json-encode api response. Was the data not serialized?")
        return json.dumps(serialize_func(context))
示例#3
0
文件: base.py 项目: ghotiv/changes
def as_json(context):
    return json.dumps(serialize_func(context))
示例#4
0
文件: base.py 项目: ghotiv/changes
 def serialize(self, *args, **kwargs):
     return serialize_func(*args, **kwargs)
示例#5
0
 def serialize(self, *args, **kwargs):
     return serialize_func(*args, **kwargs)
示例#6
0
def as_json(context):
    return json.dumps(serialize_func(context))