diff --git a/setup.py b/setup.py
index 6a63f13e3537ab5de3e1d315286ec426a495f2ff_c2V0dXAucHk=..40c819eaa6f786ba7e8dc49485c81f5e19920fb8_c2V0dXAucHk= 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@
 
 from setuptools import setup, find_packages
 
-VERSION = '1.2'
+VERSION = '1.3'
 DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python"
 LONG_DESCRIPTION = """
 simplejson is a simple, fast, complete, correct and extensible
@@ -45,4 +45,7 @@
     platforms=['any'],
     test_suite="nose.collector",
     zip_safe=True,
+    entry_points={
+        'paste.filter_app_factory': ['json = simplejson.jsonfilter:filter'],
+    },
 )
diff --git a/simplejson/__init__.py b/simplejson/__init__.py
index 6a63f13e3537ab5de3e1d315286ec426a495f2ff_c2ltcGxlanNvbi9fX2luaXRfXy5weQ==..40c819eaa6f786ba7e8dc49485c81f5e19920fb8_c2ltcGxlanNvbi9fX2luaXRfXy5weQ== 100644
--- a/simplejson/__init__.py
+++ b/simplejson/__init__.py
@@ -57,7 +57,7 @@
 Note that the JSON produced by this module is a subset of YAML,
 so it may be used as a serializer for that as well.
 """
-__version__ = '1.2'
+__version__ = '1.3'
 __all__ = [
     'dump', 'dumps', 'load', 'loads',
     'JSONDecoder', 'JSONEncoder',
diff --git a/simplejson/jsonfilter.py b/simplejson/jsonfilter.py
new file mode 100644
index 0000000000000000000000000000000000000000..40c819eaa6f786ba7e8dc49485c81f5e19920fb8_c2ltcGxlanNvbi9qc29uZmlsdGVyLnB5
--- /dev/null
+++ b/simplejson/jsonfilter.py
@@ -0,0 +1,42 @@
+import simplejson
+import cgi
+
+class JSONFilter(object):
+    def __init__(self, app, mime_type='text/x-json'):
+        self.app = app
+        self.mime_type = mime_type
+
+    def __call__(self, environ, start_response):
+        # Read JSON POST input to jsonfilter.json if matching mime type
+        response = {'status': '200 OK', 'headers': []}
+        def json_start_response(status, headers):
+            response['status'] = status
+            response['headers'].extend(headers)
+        environ['jsonfilter.mime_type'] = self.mime_type
+        if environ.get('REQUEST_METHOD', '') == 'POST':
+            if environ.get('CONTENT_TYPE', '') == self.mime_type:
+                args = [_ for _ in [environ.get('CONTENT_LENGTH')] if _]
+                data = environ['wsgi.input'].read(*map(int, args))
+                environ['jsonfilter.json'] = simplejson.loads(data)
+        res = simple_json.dumps(app(environ, json_start_response))
+        jsonp = res.parse_qs(environ.get('QUERY_STRING', '')).get('jsonp')
+        if jsonp:
+            content_type = 'text/javascript'
+            res = ''.join(jsonp + ['(', res, ')'])
+        elif 'Opera' in environ.get('HTTP_USER_AGENT', ''):
+            # Opera has bunk XMLHttpRequest support for most mime types
+            content_type = 'text/plain'
+        else:
+            content_type = self.mime_type
+        headers = [
+            ('Content-type', content_type),
+            ('Content-length', len(res)),
+        ]
+        headers.extend(response['headers'])
+        start_response(response['status'], headers)
+        return [res]
+
+def jsonfilter_factory(global_conf, **kw):
+    def make_filter(app):
+        return JSONFilter(app, **kw)
+    return make_filter