No content to map due to end-of-input jackson parser

前端 未结 11 1936
盖世英雄少女心
盖世英雄少女心 2020-12-23 19:00

I am getting this response from the server {\"status\":\"true\",\"msg\":\"success\"}

I am trying to parse this json string using Jackson parser library

11条回答
  •  执笔经年
    2020-12-23 19:13

    A simple fix could be Content-Type: application/json

    You are probably making a REST API call to get the response.

    Mostly you are not setting Content-Type: application/json when you the request. Content-Type: application/x-www-form-urlencoded will be chosen which might be causing this exception.

提交回复
热议问题