I have following piece of code :
JsonObject json = (JsonObject) attVal;
HashSet<Map.Entry<String,JsonElement>> map = (HashSet<Map.Entry<String, JsonElement>>) json.entrySet();
I am getting below exception at line 2:
java.lang.ClassCastException: java.util.HashMap$EntrySet cannot be cast to java.util.HashSet
My json input is: {"key":"4e32cd954f31320078c5fd218110c7ca","number":"","unique_key":"001"}
What is the reason and how to solve this?
Set<Entry<String, JsonElement>>that's already returned?