java.lang.ClassCastException: java.lang.String cannot be cast to net.minidev.json.JSONObject -
java.lang.classcastexception: java.lang.string cannot cast net.minidev.json.jsonobject
jsonparser jsonparser = new jsonparser(); object obj = jsonparser.parse(new filereader(location.getabsolutepath())); jsonobject jobj = (jsonobject) obj;
how input file like?
if it's content like:
"some string"
then call jsonparser.parse()
return java.lang.string
causing subsequent failure of cast jsonobject
.
Comments
Post a Comment