toJSONifies before generating