+.. function:: serialize(obj)
+ Serialize the object to JSON.
+.. function:: deserialize(str)
+ Deserialize JSON-encoded object to a Python object.
+.. function:: force_implementation(name)
+ Load a specific json module. This is useful for testing and not much else
+.. attribute:: implementation
+ The json implementation object. This is probably not useful to you,
+ except to get the name of the implementation in use. The name is
+ available through `implementation.name`.
List of known json modules, and the names of their serialize/unserialize
raise ImportError("No module named: %s" % modname)
- for modspec in _modules:
- print "Supported JSON modules found:", ", ".join(installed)
- print "No supported JSON modules found"
if __name__ == "__main__":
- # If run as a script, we
simply print what is installed that we support.
+ # If run as a script, we .
# We do NOT try to load a compatible module because that may throw an
# exception, which renders the package uninstallable with easy_install
# (It trys to execfile the script when installing, to make sure it works)
+ print "Running anyjson as a stand alone script is not supported"