package smims.networking.messages;

import java.lang.reflect.*;
import java.util.Collection;

import com.google.gson.*;

import smims.networking.model.Board;
import smims.networking.model.BoardDescriptor;

public class BoardDeserializer implements JsonDeserializer<Board>{

	@Override
	public Board deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext jsonContext) throws JsonParseException {
		return new Board(
				jsonContext.deserialize(json.getAsJsonObject().get("boardDescriptor"), BoardDescriptor.class),
				jsonContext.deserialize(json.getAsJsonObject().get("charactersOnBoard"), Collection.class),
				json.getAsJsonObject().get("boardSectionSize").getAsInt());
	}
}

@@ -112,16 +112,58 @@
 .gson.*;
+%0Aimport com.google.gson.reflect.TypeToken;
 %0A%0Aimport
@@ -646,24 +646,59 @@
 %22), 
-Collection.c
+new TypeToken%3CCollection%3CCharacter%3E%3E()%7B%7D.getC
 lass
+()
 ),%0A%09

Fix gson, maybe