我有以下代码:
var data = JSON.parse(error.response.data)
但它引发了以下错误:
SyntaxError: Unexpected token o in JSON at position 1
这就是error.response.data:
里面的内容{
"message": "The request is invalid.",
"modelState": {
"dto.IsInternal": [
"Error converting value {null} to type 'System.Boolean'. Path 'IsInternal', line 1, position 86."
]
}
}
我该如何解决?