import json


def json_object(object):
    """
    Method for formatting object request into JSON
    if not serialize the object, dont parse it
    :param object: representation of request
    :return: JSON-ify object
    """
    if isinstance(object, dict) or isinstance(object, list):
        return json.dumps(object)
    return object