Class Workspace.WorkspaceDeserializer

java.lang.Object
net.mcreator.workspace.Workspace.WorkspaceDeserializer
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Workspace>
Enclosing class:
Workspace

public static class Workspace.WorkspaceDeserializer extends Object implements com.google.gson.JsonDeserializer<Workspace>
Deserializer for Workspace objects that determines the generator flavor of the workspace being deserialized from the workspace JSON itself and delegates the actual deserialization to a Gson instance aware of this generator flavor. This way adapters of objects used by the workspace can behave based on the generator flavor of the workspace they belong to.
  • Constructor Details

    • WorkspaceDeserializer

      public WorkspaceDeserializer()
  • Method Details

    • deserialize

      public Workspace deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<Workspace>
      Throws:
      com.google.gson.JsonParseException