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