save to json when upload template