Examples of registerTypeHierarchyAdapter()


Examples of com.google.gson.GsonBuilder.registerTypeHierarchyAdapter()

        GsonBuilder builder = new GsonBuilder();
        // uncomment if you wish to debug generated json
         builder.setPrettyPrinting();
        builder.registerTypeHierarchyAdapter(ChartEnum.class,
                new ChartEnumSerializer());
        builder.registerTypeHierarchyAdapter(SolidColor.class,
                new SolidColorSerializer());
        builder.registerTypeHierarchyAdapter(AxisList.class,
                new AxisListSerializer());
        builder.registerTypeHierarchyAdapter(PaneList.class,
                new PaneListSerializer());
View Full Code Here

Examples of com.google.gson.GsonBuilder.registerTypeHierarchyAdapter()

         builder.setPrettyPrinting();
        builder.registerTypeHierarchyAdapter(ChartEnum.class,
                new ChartEnumSerializer());
        builder.registerTypeHierarchyAdapter(SolidColor.class,
                new SolidColorSerializer());
        builder.registerTypeHierarchyAdapter(AxisList.class,
                new AxisListSerializer());
        builder.registerTypeHierarchyAdapter(PaneList.class,
                new PaneListSerializer());
        builder.registerTypeAdapter(ContainerDataSeries.class,
                new ContainerDataSeriesSerializer());
View Full Code Here

Examples of com.google.gson.GsonBuilder.registerTypeHierarchyAdapter()

                new ChartEnumSerializer());
        builder.registerTypeHierarchyAdapter(SolidColor.class,
                new SolidColorSerializer());
        builder.registerTypeHierarchyAdapter(AxisList.class,
                new AxisListSerializer());
        builder.registerTypeHierarchyAdapter(PaneList.class,
                new PaneListSerializer());
        builder.registerTypeAdapter(ContainerDataSeries.class,
                new ContainerDataSeriesSerializer());
        builder.registerTypeAdapterFactory(new DataSeriesItemTypeAdapterFactory());
        builder.registerTypeAdapterFactory(new AbstractSeriesTypeAdapterFactory());
View Full Code Here

Examples of com.google.gson.GsonBuilder.registerTypeHierarchyAdapter()

      builder.registerTypeAdapterFactory(new DeserializationConstructorAndReflectiveTypeAdapterFactory(
            new ConstructorConstructor(ImmutableMap.<Type, InstanceCreator<?>>of()), serializationPolicy,
            Excluder.DEFAULT, deserializationPolicy));

      // complicated (serializers/deserializers as they need context to operate)
      builder.registerTypeHierarchyAdapter(Enum.class, new EnumTypeAdapterThatReturnsFromValue());

      for (Map.Entry<Type, Object> binding : bindings.getBindings().entrySet()) {
         builder.registerTypeAdapter(binding.getKey(), binding.getValue());
      }
View Full Code Here

Examples of net.minecraft.util.com.google.gson.GsonBuilder.registerTypeHierarchyAdapter()

    public UserCache(MinecraftServer minecraftserver, File file1) {
        this.f = minecraftserver;
        this.g = file1;
        GsonBuilder gsonbuilder = new GsonBuilder();

        gsonbuilder.registerTypeHierarchyAdapter(UserCacheEntry.class, new BanEntrySerializer(this, (GameProfileLookup) null));
        this.b = gsonbuilder.create();
        this.b();
    }

    private static GameProfile a(MinecraftServer minecraftserver, String s) {
View Full Code Here

Examples of net.minecraft.util.com.google.gson.GsonBuilder.registerTypeHierarchyAdapter()

    public JsonList(File file1) {
        this.c = file1;
        GsonBuilder gsonbuilder = (new GsonBuilder()).setPrettyPrinting();

        gsonbuilder.registerTypeHierarchyAdapter(JsonListEntry.class, new JsonListEntrySerializer(this, (JsonListType) null));
        this.b = gsonbuilder.create();
    }

    public boolean isEnabled() {
        return this.e;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.