import json


def _dumps(obj) -> str:
    """
        Does the same as the json.dumps function, but adds a newline character after the serialization.
        :param obj: Object to be serialized
        :return: The serialized object, plus a newline character.
    """
    return json.dumps(obj) + '\n'