How to get the Json java object using javascript -


my requirement have put value or list key value pair on json object,for have done on java class not able figure out how retrieve same json object used in java class through java script on jsp page.please me out problem

import org.json.simple.jsonobject; class beanmanager{     private jsonobject jsonobject;     public jsonobject getjson()     {         jsonobject=new jsonobject();         jsonobject.put("name","jack daniel");         jsonobject.put("age","3");     } } 

in jsp attach json content html node , in javascript read node content , evaluate them js object.

such solution might usefull temporal only. consider use way


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -