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

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -