Closed GoogleCodeExporter closed 9 years ago
https://groups.google.com/d/msg/google-gson/1d7EtAcSly0/Lk9WW1LLcSsJ EnumSet<Color> foo = EnumSet.of(Color.blue, Color.red); String json = gson.toJson(foo); EnumSet<Color> bar = (EnumSet<Color>)gson.fromJson(json, new TypeToken<EnumSet<Color>>() {}.getType()); System.out.printf("foo: " + foo + "\nbar: " + bar + '\n'); Gson returns a LinkedHashSet that causes ClassCastException.
Original issue reported on code.google.com by inder123 on 27 Mar 2013 at 2:22
inder123
Fixed in r1228
Original comment by inder123 on 4 Apr 2013 at 9:16
Original issue reported on code.google.com by
inder123
on 27 Mar 2013 at 2:22