def METHOD_NAME(function):
    """ Decorator for validating requested JSON whether is in
        correct JSON format
    Args:
          function (func) : Controller (router)
    """
    @wraps(function)
    def wrapper(*args, **kw):
        if request.headers.get('Content-Type') != 'application/json':
            res = error("Request body should be application/json")
            return res, 400
        elif request.json is None:
            res = error("application/json returns `None`")
            return res, 400
        # Otherwise, keep executing route controller
        return function(*args, **kw)
    return wrapper