<NME> _json.py
<BEF> import json
import typing as _t
from types import ModuleType

class _CompactJSON:
    """Wrapper around json module that strips whitespace."""


    @staticmethod
    def loads(payload: _t.Union[str, bytes]) -> _t.Any:
        return json.loads(payload)

    @staticmethod
    def dumps(obj: _t.Any, **kwargs: _t.Any) -> str:
        kwargs.setdefault("ensure_ascii", False)
        kwargs.setdefault("separators", (",", ":"))
        return json.dumps(obj, **kwargs)


class DeprecatedJSON(ModuleType):
            DeprecationWarning,
            stacklevel=2,
        )
        return getattr(json, item)


deprecated_json = DeprecatedJSON("json")

<MSG> Merge pull request #240 from pallets/update-typing

mark top-level names as exported
<DFF> @@ -1,4 +1,4 @@
-import json
+import json as _json
 import typing as _t
 from types import ModuleType
 
@@ -8,13 +8,13 @@ class _CompactJSON:
 
     @staticmethod
     def loads(payload: _t.Union[str, bytes]) -> _t.Any:
-        return json.loads(payload)
+        return _json.loads(payload)
 
     @staticmethod
     def dumps(obj: _t.Any, **kwargs: _t.Any) -> str:
         kwargs.setdefault("ensure_ascii", False)
         kwargs.setdefault("separators", (",", ":"))
-        return json.dumps(obj, **kwargs)
+        return _json.dumps(obj, **kwargs)
 
 
 class DeprecatedJSON(ModuleType):
@@ -28,7 +28,7 @@ class DeprecatedJSON(ModuleType):
             DeprecationWarning,
             stacklevel=2,
         )
-        return getattr(json, item)
+        return getattr(_json, item)
 
 
-deprecated_json = DeprecatedJSON("json")
+json = DeprecatedJSON("json")

Merge pull request #240 from pallets/update-typing