コード例 #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))