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

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -