mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-06 04:13:51 +00:00
Merge branch 'import_dbdata'
This commit is contained in:
commit
6f3f96f697
2 files changed
+6
No files matched your search
+3
@@ -13,6 +13,9 @@ public class NationalityJsonDeserialzer implements JsonDeserializer<Nationality>
|
||||
@Override
|
||||
public Nationality deserialize(JSONObject object) throws JsonDeserializationException {
|
||||
String threeLetterIOCAcronym = (String) object.get(NationalityJsonSerializer.FIELD_IOC);
|
||||
if (threeLetterIOCAcronym == null) {
|
||||
return null;
|
||||
}
|
||||
return new NationalityImpl(threeLetterIOCAcronym);
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -11,6 +11,9 @@ public class NationalityJsonSerializer implements JsonSerializer<Nationality> {
|
||||
|
||||
@Override
|
||||
public JSONObject serialize(Nationality object) {
|
||||
if (object == null) {
|
||||
return null;
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put(FIELD_IOC, object.getThreeLetterIOCAcronym());
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user