Go-如何使用gin接收ajax类型为DELETE的json数据

I'm making web application. But I conflict big problem. In back-end, I made function for DELETE.

Here is DELETE function :

router.DELETE("/rsv/delete", func(c *gin.Context) {
    //how to receive json data?
})

And I send json data by Ajax.

Here is Ajax function :

$.ajax({
    url: "/rsv/delete",
    type: "DELETE",
    data: parse_delete,
    contentType: "application/json",
    success: function(result) {
        if (result) {
            alert("삭제가 완료되었습니다!");
            location.href = "/member_index";
        }

        else {
            alert("Error");
        }
    }
})

Please Help me.

You may try BindJson method of gin.Context.

var json SomeJsonStruct
if c.BindJSON(&json) == nil {
    //...
}