parameters: (manifest, path)
docstring: Writes the contents of this manifest file as a JSON-encoded text file.
  
    Args:
      manifest: The manifest structure to write.
      path: The path to write the manifest file to.
  
    Raises:
      Exception: If the file could not be written.
docstring_summary: Writes the contents of this manifest file as a JSON-encoded text file.
docstring_tokens: Writes the contents of this manifest file as a JSON - encoded text file .
function: def write_json_to_file(manifest, path):
    """ Writes the contents of this manifest file as a JSON-encoded text file.
  
    Args:
      manifest: The manifest structure to write.
      path: The path to write the manifest file to.
  
    Raises:
      Exception: If the file could not be written.
    """
    manifest_text = json.dumps(manifest, indent=2,
                               sort_keys=True, separators=(',', ': '))
    output_path = os.path.realpath(path)
    try:
      output_file = open(output_path, 'w')
    except IOError, msg:
      raise Exception("Failed to write the samples manifest file."
                      "The specific error was: %s." % msg)
    output_file.write(manifest_text)
    output_file.close()
function_tokens: def write_json_to_file ( manifest , path ) : manifest_text = json . dumps ( manifest , indent = 2 , sort_keys = True , separators = ( ',' , ': ' ) ) output_path = os . path . realpath ( path ) try : output_file = open ( output_path , 'w' ) except IOError , msg : raise Exception ( "Failed to write the samples manifest file." "The specific error was: %s." % msg ) output_file . write ( manifest_text ) output_file . close ( )