diff --git a/.bach/bach.info/module-info.java b/.bach/bach.info/module-info.java
index e9eae85..b6f7e33 100644
--- a/.bach/bach.info/module-info.java
+++ b/.bach/bach.info/module-info.java
@@ -1,5 +1,6 @@
import com.github.sormuras.bach.ProjectInfo;
import com.github.sormuras.bach.ProjectInfo.Externals;
+import com.github.sormuras.bach.ProjectInfo.External;
import com.github.sormuras.bach.ProjectInfo.Externals.Name;
import com.github.sormuras.bach.ProjectInfo.Tools;
import com.github.sormuras.bach.ProjectInfo.Tweak;
@@ -13,6 +14,11 @@ import com.github.sormuras.bach.ProjectInfo.Tweak;
tool = "jlink",
option = "--launcher",
value = "worldclock=worldclock/com.carlfx.worldclock.Launcher")
+ },
+ lookupExternal = {
+ @External(module = "com.fasterxml.jackson.core", via = "com.fasterxml.jackson.core:jackson-core:2.12.1"),
+ @External(module = "com.fasterxml.jackson.annotation", via = "com.fasterxml.jackson.core:jackson-annotations:2.12.1"),
+ @External(module = "com.fasterxml.jackson.databind", via = "com.fasterxml.jackson.core:jackson-databind:2.12.1")
})
module bach.info {
requires com.github.sormuras.bach;
diff --git a/pom.xml b/pom.xml
index fe47b18..ca336b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,16 +15,30 @@
javafx-controls
${javafx.version}
+
+ org.openjfx
+ javafx-web
+ ${javafx.version}
+
org.openjfx
javafx-fxml
${javafx.version}
- com.jsoniter
- jsoniter
- 0.9.23
- compile
+ com.fasterxml.jackson.core
+ jackson-core
+ 2.12.1
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ 2.12.1
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ 2.12.1
diff --git a/src/main/java/com/carlfx/worldclock/App.java b/src/main/java/com/carlfx/worldclock/App.java
index 2f350c0..4c985db 100644
--- a/src/main/java/com/carlfx/worldclock/App.java
+++ b/src/main/java/com/carlfx/worldclock/App.java
@@ -1,7 +1,6 @@
package com.carlfx.worldclock;
-import com.jsoniter.JsonIterator;
-import com.jsoniter.any.Any;
+import com.fasterxml.jackson.databind.ObjectMapper;
import javafx.animation.*;
import javafx.application.Application;
import javafx.application.Platform;
@@ -107,28 +106,25 @@ public class App extends Application {
"locations.json"));
if (locationsJson.exists()) {
try {
-
String actual = Files.readString(locationsJson.toPath());
if (!"".equals(actual)) {
- List locationList = JsonIterator.deserialize(actual).asList();
- locationList.stream().map(any -> {
- Location location = null;
- String timezone = any.get("timezone").toString();
- String city = any.get("city").toString();
- String countryCode = any.get("countryCode").toString();
- String state = any.get("state") != null ? any.get("state").toString() : "";
- if ("US".equalsIgnoreCase(countryCode)) {
- location = new USLocation(timezone, city, state);
- } else {
- location = new Location(timezone, city, countryCode);
+ ObjectMapper objectMapper = new ObjectMapper();
+ List