@@ -0,0 +1,2243 @@
+package com.graphicsengine.io.gson;%0A%0Aimport java.lang.reflect.Type;%0A%0Aimport com.google.gson.Gson;%0Aimport com.google.gson.JsonDeserializationContext;%0Aimport com.google.gson.JsonDeserializer;%0Aimport com.google.gson.JsonElement;%0Aimport com.google.gson.JsonObject;%0Aimport com.google.gson.JsonParseException;%0Aimport com.graphicsengine.map.PlayfieldNode;%0Aimport com.graphicsengine.scene.GraphicsEngineNodeType;%0Aimport com.graphicsengine.scene.QuadParentNode;%0Aimport com.graphicsengine.scene.SharedMeshQuad;%0Aimport com.graphicsengine.spritemesh.SpriteMeshNode;%0Aimport com.graphicsengine.ui.Element;%0Aimport com.nucleus.Error;%0Aimport com.nucleus.scene.Node;%0A%0Apublic class NodeDeserializer implements JsonDeserializer%3CNode%3E %7B%0A%0A    private Gson gson;%0A%0A    public void setGson(Gson gson) %7B%0A        this.gson = gson;%0A    %7D%0A%0A    @Override%0A    public Node deserialize(JsonElement json, Type type, JsonDeserializationContext context)%0A            throws JsonParseException %7B%0A        %0A        JsonObject obj = json.getAsJsonObject();%0A        GraphicsEngineNodeType t = GraphicsEngineNodeType.valueOf(obj.get(%22type%22).getAsString());%0A        switch (t) %7B%0A        case playfieldNode:%0A            return gson.fromJson(json, PlayfieldNode.class);%0A        case element:%0A            return gson.fromJson(json, Element.class);%0A        case quadNode:%0A            return gson.fromJson(json, QuadParentNode.class);%0A        case sharedMeshNode:%0A            return gson.fromJson(json, SharedMeshQuad.class);%0A        case spriteMeshNode:%0A            return gson.fromJson(json, SpriteMeshNode.class);%0A        default:%0A            throw new IllegalArgumentException(Error.NOT_IMPLEMENTED.message);%0A        %7D%0A        %0A        %0A        /*%0A         * JsonObject obj = json.getAsJsonObject();%0A         * com.nucleus.bounds.Bounds.Type t = com.nucleus.bounds.Bounds.Type%0A         * .valueOf(obj.get(Bounds.SerializeNames.type.name()).getAsString());%0A         * JsonArray array = obj.get(Bounds.SerializeNames.bounds.name()).getAsJsonArray();%0A         * float%5B%5D values = new float%5Barray.size()%5D;%0A         * for (int i = 0; i %3C array.size(); i++) %7B%0A         * values%5Bi%5D = array.get(i).getAsFloat();%0A         * %7D%0A         * return BoundsFactory.create(t, values);%0A         */%0A    %7D%0A%0A%7D%0A

Add GSON node deserializer