code: def quote(value):
      
      if value == None:
          output = ""
      elif is_text(value):
          output = encode_basestring(value)
      else:
          output = _json.dumps(value)
      return output
docs: return JSON-quoted value
      :param value:
      :return: