GSON JsonObject “Unsupported Operation Exception: null” getAsString

后端 未结 4 951
无人共我
无人共我 2020-12-09 14:27

Running a Play! app with Scala. I\'m doing a request where the response is expected to be a JSON string. When checking the debugger, the JsonElement returns OK with all info

4条回答
  •  感情败类
    2020-12-09 15:21

    I had a similar problem and I had to change jsonObject.getAsString() to jsonObject.toString();

提交回复
热议问题