前端JS报错JSON parse error: Unrecognized token

现象:

 

 "JSON parse error: Unrecognized token 'form': was expecting 'null', 'true', 'false' or NaN; nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'form': was expecting 'null', 'true', 'false' or NaN↵ at [Source: (PushbackInputStream); line: 1, column: 6]"

原因:

axios({
  method: 'post',
  url: '/user/12345',
  data: {  //这个地方stringfy什么的东西删除试试
    firstName: 'Fred',
    lastName: 'Flintstone'
  }
});

 

posted @ 2021-03-05 14:52  野生野鸡码农  阅读(4655)  评论(0编辑  收藏  举报