Change the data into json, added template