def _generate_doc(ret):

    # Create a copy of the object that we will return.
    retc = ret.copy()

    # Set the ID of the document to be the JID.
    retc["_id"] = ret["jid"]

    # Add a timestamp field to the document
    retc["timestamp"] = time.time()

    return retc
Converts all values to ascii strings.
dataset/ETHPy150Open saltstack/salt/salt/returners/couchdb_return.py/_generate_doc--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/django/http/__init__.py/HttpResponse._convert_to_ascii