diff --git a/src/main/java/org/cgiar/cgspace/ctasks/CountriesVocabulary.java b/src/main/java/org/cgiar/cgspace/ctasks/CountriesVocabulary.java index 4d830aa..4e9dd09 100644 --- a/src/main/java/org/cgiar/cgspace/ctasks/CountriesVocabulary.java +++ b/src/main/java/org/cgiar/cgspace/ctasks/CountriesVocabulary.java @@ -20,9 +20,10 @@ package org.cgiar.cgspace.ctasks; import javax.annotation.Nullable; import java.util.List; +import com.google.gson.annotations.SerializedName; public class CountriesVocabulary { - List countries; //required + @SerializedName("3166-1") List countries; //required class Country { private String name; //required diff --git a/src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java b/src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java index 5793ac0..7d8bd7b 100644 --- a/src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java +++ b/src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java @@ -82,7 +82,7 @@ public class CountryCodeTagger extends AbstractCurationTask System.out.println(isocodesCountriesJson.getClass()); System.out.println(cgspaceCountriesJson.getClass()); - for (CountriesVocabulary.Country country : cgspaceCountriesJson.countries) { + for (CountriesVocabulary.Country country : isocodesCountriesJson.countries) { System.out.println(country.getName()); }