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
Post a Comment