We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
prompt.read_user_dict() is broken due to click upgrade from 7.1.2 to 8.0.0
* Cookiecutter version: 1.7.3
* Template project url: -
* Python version: 3.9.5
* Operating System: macOS Catalina 10.15.7

### Description:

Apparently, there is a breaking change in `click==8.0.0` affecting dictionary values in cookiecutter.json
cookiecutter.json example:
```json
{
    "project_name": "",
    "project_policy": {"project_policy_example": "yes"}
}
```
 
```
% python -m cookiecutter ../Projects/project-configs
devplatform_project_name [infra-dev]: 
project_name []: t
project_policy [default]: 
Error: Unable to decode to JSON.
```

Looking closer at the cookiecutter.promt, I can see that in `read_user_dict()`, click passes `user_value='default'` to `process_json()`, instead of passing an actual default value from the cookiecutter.json as it was in `click 7.1.2`. 
Link to the `process_json()` code: https://github.com/cookiecutter/cookiecutter/blob/master/cookiecutter/prompt.py#L81
![image](https://user-images.githubusercontent.com/41152092/118825592-7a01bd80-b8c3-11eb-96fb-1f7bba264783.png)

As far as I can suppose, that issue could have been introduced by this PR https://github.com/pallets/click/pull/1517/

### Quick local fix
Install click first and specify version older than 8.0.0
```
pip install click==7.1.2
pip install cookiecutter
```

### Quick fix for cookiecutter library
in `setup.py` replace 'click>=7.0' with `'click>=7,<8.0.0'`

### What I've run:

```shell
% python3.9 -m venv test39              
  
% source test39/bin/activate

% python -V
Python 3.9.5


% python -m pip install click==7.1.2
Collecting click==7.1.2
  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Installing collected packages: click
Successfully installed click-7.1.2
(test39) ro.solyanik@macbook-ro Environments % python -m pip install cookiecutter
Collecting cookiecutter
  Using cached cookiecutter-1.7.3-py2.py3-none-any.whl (34 kB)
Collecting six>=1.10
................................................
Installing collected packages: six, python-dateutil, MarkupSafe, urllib3, text-unidecode, Jinja2, idna, chardet, certifi, arrow, requests, python-slugify, poyo, jinja2-time, binaryornot, cookiecutter
Successfully installed Jinja2-3.0.1 MarkupSafe-2.0.1 arrow-1.1.0 binaryornot-0.4.4 certifi-2020.12.5 chardet-4.0.0 cookiecutter-1.7.3 idna-2.10 jinja2-time-0.2.0 poyo-0.5.0 python-dateutil-2.8.1 python-slugify-5.0.2 requests-2.25.1 six-1.16.0 text-unidecode-1.3 urllib3-1.26.4

% python -m cookiecutter ../Projects/project-configs
project_name []: t
project_policy [default]: 

% ls t  
Makefile        README.md       t               tests

% rm -rf t

% python -m pip install click==8.0.0                
Collecting click==8.0.0
  Using cached click-8.0.0-py3-none-any.whl (96 kB)
Installing collected packages: click
  Attempting uninstall: click
    Found existing installation: click 7.1.2
    Uninstalling click-7.1.2:
      Successfully uninstalled click-7.1.2
Successfully installed click-8.0.0

% python -m cookiecutter ../Projects/project-configs
devplatform_project_name [infra-dev]: 
project_name []: t
project_policy [default]: 
Error: Unable to decode to JSON.
project_policy [default]: 
Error: Unable to decode to JSON.
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 """cookiecutter distutils configuration."""
5 
6 import os
7 import io
8 import sys
9 
10 from setuptools import setup
11 
12 version = "1.7.3"
13 
14 if sys.argv[-1] == 'publish':
15     os.system('python setup.py sdist upload')
16     os.system('python setup.py bdist_wheel upload')
17     sys.exit()
18 
19 if sys.argv[-1] == 'tag':
20     os.system("git tag -a %s -m 'version %s'" % (version, version))
21     os.system("git push --tags")
22     sys.exit()
23 
24 with io.open('README.md', 'r', encoding='utf-8') as readme_file:
25     readme = readme_file.read()
26 
27 requirements = [
28     'binaryornot>=0.4.4',
29     'Jinja2>=2.7,<4.0.0',
30     'click>=7.0',
31     'poyo>=0.5.0',
32     'jinja2-time>=0.2.0',
33     'python-slugify>=4.0.0',
34     'requests>=2.23.0',
35     'six>=1.10',
36 ]
37 
38 if sys.argv[-1] == 'readme':
39     print(readme)
40     sys.exit()
41 
42 
43 setup(
44     name='cookiecutter',
45     version=version,
46     description=(
47         'A command-line utility that creates projects from project '
48         'templates, e.g. creating a Python package project from a '
49         'Python package project template.'
50     ),
51     long_description=readme,
52     long_description_content_type='text/markdown',
53     author='Audrey Roy',
54     author_email='audreyr@gmail.com',
55     url='https://github.com/cookiecutter/cookiecutter',
56     packages=['cookiecutter'],
57     package_dir={'cookiecutter': 'cookiecutter'},
58     entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']},
59     include_package_data=True,
60     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
61     install_requires=requirements,
62     extras_require={':python_version<"3.3"': ['whichcraft>=0.4.0']},
63     license='BSD',
64     zip_safe=False,
65     classifiers=[
66         "Development Status :: 5 - Production/Stable",
67         "Environment :: Console",
68         "Intended Audience :: Developers",
69         "Natural Language :: English",
70         "License :: OSI Approved :: BSD License",
71         "Programming Language :: Python",
72         "Programming Language :: Python :: 2",
73         "Programming Language :: Python :: 2.7",
74         "Programming Language :: Python :: 3",
75         "Programming Language :: Python :: 3.5",
76         "Programming Language :: Python :: 3.6",
77         "Programming Language :: Python :: 3.7",
78         "Programming Language :: Python :: 3.8",
79         "Programming Language :: Python :: Implementation :: CPython",
80         "Programming Language :: Python :: Implementation :: PyPy",
81         "Topic :: Software Development",
82     ],
83     keywords=(
84         'cookiecutter, Python, projects, project templates, Jinja2, '
85         'skeleton, scaffolding, project directory, setup.py, package, '
86         'packaging'
87     ),
88 )
89
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@
 requirements = [
     'binaryornot>=0.4.4',
     'Jinja2>=2.7,<4.0.0',
-    'click>=7.0',
+    'click>=7.0,<8.0.0',
     'poyo>=0.5.0',
     'jinja2-time>=0.2.0',
     'python-slugify>=4.0.0',

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -27,7 +27,7 @@\n requirements = [\n     'binaryornot>=0.4.4',\n     'Jinja2>=2.7,<4.0.0',\n-    'click>=7.0',\n+    'click>=7.0,<8.0.0',\n     'poyo>=0.5.0',\n     'jinja2-time>=0.2.0',\n     'python-slugify>=4.0.0',\n", "issue": "prompt.read_user_dict() is broken due to click upgrade from 7.1.2 to 8.0.0\n* Cookiecutter version: 1.7.3\r\n* Template project url: -\r\n* Python version: 3.9.5\r\n* Operating System: macOS Catalina 10.15.7\r\n\r\n### Description:\r\n\r\nApparently, there is a breaking change in `click==8.0.0` affecting dictionary values in cookiecutter.json\r\ncookiecutter.json example:\r\n```json\r\n{\r\n    \"project_name\": \"\",\r\n    \"project_policy\": {\"project_policy_example\": \"yes\"}\r\n}\r\n```\r\n \r\n```\r\n% python -m cookiecutter ../Projects/project-configs\r\ndevplatform_project_name [infra-dev]: \r\nproject_name []: t\r\nproject_policy [default]: \r\nError: Unable to decode to JSON.\r\n```\r\n\r\nLooking closer at the cookiecutter.promt, I can see that in `read_user_dict()`, click passes `user_value='default'` to `process_json()`, instead of passing an actual default value from the cookiecutter.json as it was in `click 7.1.2`. \r\nLink to the `process_json()` code: https://github.com/cookiecutter/cookiecutter/blob/master/cookiecutter/prompt.py#L81\r\n![image](https://user-images.githubusercontent.com/41152092/118825592-7a01bd80-b8c3-11eb-96fb-1f7bba264783.png)\r\n\r\nAs far as I can suppose, that issue could have been introduced by this PR https://github.com/pallets/click/pull/1517/\r\n\r\n### Quick local fix\r\nInstall click first and specify version older than 8.0.0\r\n```\r\npip install click==7.1.2\r\npip install cookiecutter\r\n```\r\n\r\n### Quick fix for cookiecutter library\r\nin `setup.py` replace 'click>=7.0' with `'click>=7,<8.0.0'`\r\n\r\n### What I've run:\r\n\r\n```shell\r\n% python3.9 -m venv test39              \r\n  \r\n% source test39/bin/activate\r\n\r\n% python -V\r\nPython 3.9.5\r\n\r\n\r\n% python -m pip install click==7.1.2\r\nCollecting click==7.1.2\r\n  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)\r\nInstalling collected packages: click\r\nSuccessfully installed click-7.1.2\r\n(test39) ro.solyanik@macbook-ro Environments % python -m pip install cookiecutter\r\nCollecting cookiecutter\r\n  Using cached cookiecutter-1.7.3-py2.py3-none-any.whl (34 kB)\r\nCollecting six>=1.10\r\n................................................\r\nInstalling collected packages: six, python-dateutil, MarkupSafe, urllib3, text-unidecode, Jinja2, idna, chardet, certifi, arrow, requests, python-slugify, poyo, jinja2-time, binaryornot, cookiecutter\r\nSuccessfully installed Jinja2-3.0.1 MarkupSafe-2.0.1 arrow-1.1.0 binaryornot-0.4.4 certifi-2020.12.5 chardet-4.0.0 cookiecutter-1.7.3 idna-2.10 jinja2-time-0.2.0 poyo-0.5.0 python-dateutil-2.8.1 python-slugify-5.0.2 requests-2.25.1 six-1.16.0 text-unidecode-1.3 urllib3-1.26.4\r\n\r\n% python -m cookiecutter ../Projects/project-configs\r\nproject_name []: t\r\nproject_policy [default]: \r\n\r\n% ls t  \r\nMakefile        README.md       t               tests\r\n\r\n% rm -rf t\r\n\r\n% python -m pip install click==8.0.0                \r\nCollecting click==8.0.0\r\n  Using cached click-8.0.0-py3-none-any.whl (96 kB)\r\nInstalling collected packages: click\r\n  Attempting uninstall: click\r\n    Found existing installation: click 7.1.2\r\n    Uninstalling click-7.1.2:\r\n      Successfully uninstalled click-7.1.2\r\nSuccessfully installed click-8.0.0\r\n\r\n% python -m cookiecutter ../Projects/project-configs\r\ndevplatform_project_name [infra-dev]: \r\nproject_name []: t\r\nproject_policy [default]: \r\nError: Unable to decode to JSON.\r\nproject_policy [default]: \r\nError: Unable to decode to JSON.\r\n```\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"cookiecutter distutils configuration.\"\"\"\n\nimport os\nimport io\nimport sys\n\nfrom setuptools import setup\n\nversion = \"1.7.3\"\n\nif sys.argv[-1] == 'publish':\n    os.system('python setup.py sdist upload')\n    os.system('python setup.py bdist_wheel upload')\n    sys.exit()\n\nif sys.argv[-1] == 'tag':\n    os.system(\"git tag -a %s -m 'version %s'\" % (version, version))\n    os.system(\"git push --tags\")\n    sys.exit()\n\nwith io.open('README.md', 'r', encoding='utf-8') as readme_file:\n    readme = readme_file.read()\n\nrequirements = [\n    'binaryornot>=0.4.4',\n    'Jinja2>=2.7,<4.0.0',\n    'click>=7.0',\n    'poyo>=0.5.0',\n    'jinja2-time>=0.2.0',\n    'python-slugify>=4.0.0',\n    'requests>=2.23.0',\n    'six>=1.10',\n]\n\nif sys.argv[-1] == 'readme':\n    print(readme)\n    sys.exit()\n\n\nsetup(\n    name='cookiecutter',\n    version=version,\n    description=(\n        'A command-line utility that creates projects from project '\n        'templates, e.g. creating a Python package project from a '\n        'Python package project template.'\n    ),\n    long_description=readme,\n    long_description_content_type='text/markdown',\n    author='Audrey Roy',\n    author_email='audreyr@gmail.com',\n    url='https://github.com/cookiecutter/cookiecutter',\n    packages=['cookiecutter'],\n    package_dir={'cookiecutter': 'cookiecutter'},\n    entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']},\n    include_package_data=True,\n    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',\n    install_requires=requirements,\n    extras_require={':python_version<\"3.3\"': ['whichcraft>=0.4.0']},\n    license='BSD',\n    zip_safe=False,\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Console\",\n        \"Intended Audience :: Developers\",\n        \"Natural Language :: English\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Topic :: Software Development\",\n    ],\n    keywords=(\n        'cookiecutter, Python, projects, project templates, Jinja2, '\n        'skeleton, scaffolding, project directory, setup.py, package, '\n        'packaging'\n    ),\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"cookiecutter distutils configuration.\"\"\"\n\nimport os\nimport io\nimport sys\n\nfrom setuptools import setup\n\nversion = \"1.7.3\"\n\nif sys.argv[-1] == 'publish':\n    os.system('python setup.py sdist upload')\n    os.system('python setup.py bdist_wheel upload')\n    sys.exit()\n\nif sys.argv[-1] == 'tag':\n    os.system(\"git tag -a %s -m 'version %s'\" % (version, version))\n    os.system(\"git push --tags\")\n    sys.exit()\n\nwith io.open('README.md', 'r', encoding='utf-8') as readme_file:\n    readme = readme_file.read()\n\nrequirements = [\n    'binaryornot>=0.4.4',\n    'Jinja2>=2.7,<4.0.0',\n    'click>=7.0,<8.0.0',\n    'poyo>=0.5.0',\n    'jinja2-time>=0.2.0',\n    'python-slugify>=4.0.0',\n    'requests>=2.23.0',\n    'six>=1.10',\n]\n\nif sys.argv[-1] == 'readme':\n    print(readme)\n    sys.exit()\n\n\nsetup(\n    name='cookiecutter',\n    version=version,\n    description=(\n        'A command-line utility that creates projects from project '\n        'templates, e.g. creating a Python package project from a '\n        'Python package project template.'\n    ),\n    long_description=readme,\n    long_description_content_type='text/markdown',\n    author='Audrey Roy',\n    author_email='audreyr@gmail.com',\n    url='https://github.com/cookiecutter/cookiecutter',\n    packages=['cookiecutter'],\n    package_dir={'cookiecutter': 'cookiecutter'},\n    entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']},\n    include_package_data=True,\n    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',\n    install_requires=requirements,\n    extras_require={':python_version<\"3.3\"': ['whichcraft>=0.4.0']},\n    license='BSD',\n    zip_safe=False,\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Console\",\n        \"Intended Audience :: Developers\",\n        \"Natural Language :: English\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Topic :: Software Development\",\n    ],\n    keywords=(\n        'cookiecutter, Python, projects, project templates, Jinja2, '\n        'skeleton, scaffolding, project directory, setup.py, package, '\n        'packaging'\n    ),\n)\n", "path": "setup.py"}]}