Convert graph JSON to Graph object on loading