def _encode_view_options(options):
    retval = {}
    for name, value in options.items():
        if name in ('key', 'startkey', 'endkey') \
                or not isinstance(value, util.strbase):
            value = json.encode(value)
        retval[name] = value
    return retval
Encode any items in the options dict that are sent as a JSON string to a
dataset/ETHPy150Open djc/couchdb-python/couchdb/client.py/_encode_view_options