<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _object_to_json(obj):
 """Convert objects that cannot be natively serialized into JSON into their string representation For datetime based objects convert them into their ISO formatted string as specified by :meth:`datetime.datetime.isoformat`. :param obj: object to convert into a JSON via getting its string representation. :type obj: object :return: String value representing the given object ready to be encoded into a JSON. :rtype: str """

        if isinstance(obj, datetime.datetime):
            return obj.isoformat()
        return repr(obj)