import json


def make_json_response(status_code, json_object, extra_headers=None, add_status=False):
    """
    Helper function to serialize a JSON object and add the JSON content type header.
    """
    headers = {
        "Content-Type": 'application/json'
    }
    if extra_headers is not None:
        headers.update(extra_headers)
    if add_status:
        json_object['status'] = status_code

    return status_code, json.dumps(json_object), headers