Beispiel #1
0
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))
Beispiel #2
0
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))
Beispiel #3
0
def as_json(context):
    return json.dumps(serialize_func(context))
Beispiel #4
0
 def serialize(self, *args, **kwargs):
     return serialize_func(*args, **kwargs)
Beispiel #5
0
 def serialize(self, *args, **kwargs):
     return serialize_func(*args, **kwargs)
Beispiel #6
0
def as_json(context):
    return json.dumps(serialize_func(context))