docs: def generate_json_docs(module, pretty_print=False, user=None):
      """Return a JSON string format of a Pale module's documentation.
  
      This string can either be printed out, written to a file, or piped to some
      other tool.
  
      This method is a shorthand for calling `generate_doc_dict` and passing
      it into a json serializer.
  
      The user argument is optional. If included, it expects the user to be an object with an "is_admin"
      boolean attribute. Any endpoint protected with a "@requires_permission" decorator will require
      user.is_admin == True to display documentation on that endpoint.
      """
      indent = None
      separators = (',', ':')
      if pretty_print:
          indent = 4
          separators = (',', ': ')
  
      module_doc_dict = generate_doc_dict(module, user)
      json_str = json.dumps(module_doc_dict,
              indent=indent,
              separators=separators)
      return json_str