java - Converting string to json object using json.simple -


i using org.json.simple.jsonobject , want convert string json object.i have tried no success. have been trying

string value=request.getparameter("savepos"); jsonobject jsonobject = (jsonobject) jsonvalue.parse(value); 

please in advance.

try this:

jsonparser parser = new jsonparser(); jsonobject json = (jsonobject) parser.parse(stringtoparse); 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -