예제 #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))