Closed GoogleCodeExporter closed 9 years ago
here's a way I've found:
open up the package (com.google.gson) and add the type hierarchy you want with
the package private registerTypeHierarchyAdapter method.
package com.google.gson;
public class JcloudsGsonPackageAccessor {
public static GsonBuilder registerTypeHierarchyAdapter(GsonBuilder builder, Class<?> baseType, Object typeAdapter) {
return builder.registerTypeHierarchyAdapter(baseType, typeAdapter);
}
}
...
JcloudsGsonPackageAccessor.registerTypeHierarchyAdapter(builder, Enum.class, new MyEnumTypeAdapter());
Original comment by adrian.f...@gmail.com
on 6 Dec 2010 at 2:19
Fixed in r709
Original comment by inder123
on 24 Jan 2011 at 10:21
Original issue reported on code.google.com by
adrian.f...@gmail.com
on 6 Dec 2010 at 2:06