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

前端 未结 11 1876
盖世英雄少女心
盖世英雄少女心 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:20

    In my case I was reading the stream in a jersey RequestEventListener I created on the server side to log the request body prior to the request being processed. I then realized that this probably resulted in the subsequent read to yield no string (which is what is passed over when the business logic is run). I verified that to be the case.

    So if you are using streams to read the JSON string be careful of that.

提交回复
热议问题