code: def use(module=None, decode=None, encode=None):
      
      global _decode, _encode, _initialized, _using
      if module is not None:
          if not isinstance(module, basestring):
              module = module.__name__
          if module not in ('cjson', 'json', 'simplejson'):
              raise ValueError('Unsupported JSON module %s' % module)
          _using = module
          _initialized = False
      else:
          assert decode is not None and encode is not None
          _using = 'custom'
          _decode = decode
          _encode = encode
          _initialized = True
docs: Set the JSON library that should be used, either by specifying a known
      module name, or by providing a decode and encode function.
  
      The modules "simplejson", "cjson", and "json" are currently supported for
      the ``module`` parameter.
  
      If provided, the ``decode`` parameter must be a callable that accepts a
      JSON string and returns a corresponding Python data structure. The
      ``encode`` callable must accept a Python data structure and return the
      corresponding JSON string. Exceptions raised by decoding and encoding
      should be propagated up unaltered.
  
      @param module: the name of the JSON library module to use, or the module
                     object itself
      @type module:  str or module
      @param decode: a function for decoding JSON strings
      @type decode:  callable
      @param encode: a function for encoding objects as JSON strings
      @type encode:  callable