getting parameter value of json object in java -


i have jsonobject :

{"result":[{"active":"true"}]}  

how can value of active?

you can use jackson

objectmapper mapper = new objectmapper(); map<string, object> parsedmap = mapper.readvalue(jsonstring, new typereference<hashmap<string, object>>() {     });  

we map key value pairs. input map<list<map<string,string>>>. "active", can use parsedmap.get("result").get(0).get("active") (note: pseudo code)


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -