code: def _parse_executable_spec(src_dir, json_file_name, parser):
      
      if not os.path.isdir(src_dir):
          parser.error("{} is not a directory".format(src_dir))
  
      if not os.path.exists(os.path.join(src_dir, json_file_name)):
          raise WorkflowBuilderException(
              "Directory {} does not contain dxworkflow.json: not a valid DNAnexus workflow source directory"
              .format(src_dir))
  
      with open(os.path.join(src_dir, json_file_name)) as desc:
          try:
              return json_load_raise_on_duplicates(desc)
          except Exception as e:
              raise WorkflowBuilderException("Could not parse {} file as JSON: {}".format(json_file_name, e.args))
docs: Returns the parsed contents of a json specification.
      Raises WorkflowBuilderException (exit code 3) if this cannot be done.