import json


def minify(js):
    """
    Minifies the input json string or object.

    :param object|str js: input json string or object (which will be stringified)
    :return: minified json string
    :rtype: str
    """
    return json.dumps(obj=json.loads(js) if type(js) == str else js, separators=(',', ':'))