diff --git a/json_minify/__init__.py b/json_minify/__init__.py index d2a12e4..b0eb570 100644 --- a/json_minify/__init__.py +++ b/json_minify/__init__.py @@ -11,9 +11,12 @@ - Conditions and variable names changed - Reformatted tests and moved to separate file - Made into a PyPI Package + - Nathan Kulzer + - Hooked into json module, like the Javascript version """ import re +import json # to hook in def json_minify(string, strip_space=True): @@ -72,3 +75,5 @@ def json_minify(string, strip_space=True): new_str.append(string[index:]) return ''.join(new_str) + +json.minify = json_minify