def generate_graph(data, course_to_id):
	"""
	Method to read the JSON and build the directed graph of courses (= DAG of course IDs)
	The graph is represented in an adjacency list format
	
	:return: A graph in adjacency list format, with vertices as course IDs and directed edges implying prerequisite relation
	:rtype: List[List[int]]
	"""
	graph = [] * len(course_to_id)
	ctr = 0
	for obj in data:
		graph.append([])
		for prereq in obj["prerequisites"]:
			graph[ctr].append(course_to_id[prereq.strip()])
		ctr += 1
	return graph