java - How to get just the name of a name-value pair in JSON -
for student project given list of json strings have include given name-value pairs. validate if incoming json string fits 1 of these trying compare names of incoming json string existing ones.
example:
{ "type" : "login" , "nick" : "max" , "group" : "sales" , } how can name, in case "type", "nick" or "group?
deserialize json map call keys()
type type = new typetoken<map<string, string>>(){}.gettype(); gson gson = new gson(); map<string,string> map = gson.fromjson(jsonstring, type); // call map.keys()
Comments
Post a Comment