# Path: plenario/api/common.py
# def unknown_object_json_handler(obj):
#     """When trying to dump values into JSON, sometimes the json.dumps() method
#     finds values that it cannot serialize. This converts those objects from
#     a non-serializable format to a serializable one.
# 
#     :param obj: object that json is trying to convert
#     :returns: converted object
#     """
#     if type(obj) == Table:
#         return obj.name
#     elif isinstance(obj, date):
#         return obj.isoformat()
#     elif isinstance(obj, datetime):
#         return obj.isoformat()
#     elif isinstance(obj, time):
#         return obj.isoformat()
#     elif isinstance(obj, MetaTable):
#         return obj.__tablename__
#     else:
#         raise ValueError('{0} cannot be parsed into JSON. \n'
#                          '{0} is of type: {1}.'.format(obj, type(obj)))


import json
from flask import make_response, request
from plenario.api.common import unknown_object_json_handler




def make_error(msg, status_code):
    resp = {
        'meta': {
        },
        'error': msg,
    }

    resp['meta']['query'] = request.args
    resp = make_response(

# Path: plenario/api/common.py
# def unknown_object_json_handler(obj):
#     """When trying to dump values into JSON, sometimes the json.dumps() method
#     finds values that it cannot serialize. This converts those objects from
#     a non-serializable format to a serializable one.
# 
#     :param obj: object that json is trying to convert
#     :returns: converted object
#     """
#     if type(obj) == Table:
#         return obj.name
#     elif isinstance(obj, date):
#         return obj.isoformat()
#     elif isinstance(obj, datetime):
#         return obj.isoformat()
#     elif isinstance(obj, time):
#         return obj.isoformat()
#     elif isinstance(obj, MetaTable):
#         return obj.__tablename__
#     else:
#         raise ValueError('{0} cannot be parsed into JSON. \n'
#                          '{0} is of type: {1}.'.format(obj, type(obj)))


# Path: plenario/sensor_network/api/sensor_response.py
import json
from flask import make_response, request
from plenario.api.common import unknown_object_json_handler





def make_error(msg, status_code):
    resp = {
        'meta': {
        },
        'error': msg,
    }

    resp['meta']['query'] = request.args
    resp = make_response(

        json.dumps(resp, default=unknown_object_json_handler),