Make sure option.graph is enabled before writing the json.