Gson: Expected a string but was BEGIN_OBJECT
问题 I am trying to read a simple JSON response. { "response": "ok" } Here is my code: JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8")); String response = null; boolean success = false; reader.beginObject(); if (reader.hasNext()) { String token = reader.nextName(); if (token.equals("response")) { response = reader.nextString(); } else { reader.skipValue(); } } reader.endObject(); reader.close(); But I am getting this error: Expected a string but was BEGIN_OBJECT I don't