- A+
所属分类:- Spring
---
title: "com.fasterxml.jackson.core.JsonParseException: Unrecognized token was expecting ('true', 'false' or 'null')"
date: 2018-08-04 12:40:56
categories:
- Spring
- ajax
---
springboot中ajax向后台传入json数据时报错
com.fasterxml.jackson.core.JsonParseException: Unrecognized token was expecting ('true', 'false' or 'null')
data : {"name" : "abcd"}
需要加上JSON.stringify(),问题解决。
JSON.stringify() 方法是将一个JavaScript值(对象或者数组)转换为一个 JSON字符串
data : JSON.stringify({"name" : "abcd"})
