update verification

now using java types instead of Map<String, Object>
This commit is contained in:
Neil Gentleman 2015-11-19 18:28:24 -08:00
parent 584b532598
commit 26b8b88963
4 changed files with 213 additions and 69 deletions

View file

@ -0,0 +1,31 @@
package mage.verify;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.List;
import java.util.Map;
class JsonSet {
static Map<String, JsonSet> loadAll() throws IOException {
return new ObjectMapper().readValue(
JsonSet.class.getResourceAsStream("AllSets.json"),
new TypeReference<Map<String, JsonSet>>() {});
}
public String name;
public String code;
public String oldCode;
public String gathererCode;
public String magicCardsInfoCode;
public String[] magicRaritiesCodes;
public String releaseDate;
public String border;
public String type;
public List<Object> booster; // [String|[String]]
public List<JsonCard> cards;
public String block;
public boolean onlineOnly;
}