Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'name': was expecting (

<script>
    function geteditinfo(sno) {
        var student = {
            sno:sno
        };
        if(!sno){
            alert(sno);
            return false;
        }
        $.ajax({
            url:"${pageContext.request.contextPath }/student/showStuInfo.action",
            type:"post",
            contentType:"application/json;charset=utf-8",
            data:JSON.stringify(student),
            success:function (data) {
                alert(data.id);
            },
            error:function(XmlHttpRequest)
            {
                alert(XmlHttpRequest.responseText);
            }
            
        });

    }
</script>
 
 
data:JSON.stringify(student),

猜你喜欢

转载自blog.csdn.net/weixin_33145939/article/details/80723711