summaryrefslogtreecommitdiff
path: root/cherrypy/lib/jsontools.py
diff options
context:
space:
mode:
Diffstat (limited to 'cherrypy/lib/jsontools.py')
-rw-r--r--cherrypy/lib/jsontools.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cherrypy/lib/jsontools.py b/cherrypy/lib/jsontools.py
index 90b3ff8a..79ceaa48 100644
--- a/cherrypy/lib/jsontools.py
+++ b/cherrypy/lib/jsontools.py
@@ -1,5 +1,5 @@
import cherrypy
-from cherrypy._cpcompat import basestring, ntou, json_encode, json_decode
+from cherrypy._cpcompat import text_or_bytes, ntou, json_encode, json_decode
def json_processor(entity):
@@ -41,7 +41,7 @@ def json_in(content_type=[ntou('application/json'), ntou('text/javascript')],
package importable; otherwise, ValueError is raised during processing.
"""
request = cherrypy.serving.request
- if isinstance(content_type, basestring):
+ if isinstance(content_type, text_or_bytes):
content_type = [content_type]
if force: