From 1221a95c725222c07a6ecee702cfdad2a35ced25 Mon Sep 17 00:00:00 2001 From: Rohan Sircar Date: Tue, 19 May 2020 10:29:11 +0530 Subject: [PATCH] Finalized JSON deserialization --- build.sbt | 5 +- src/main/resources/fxml/Chat.fxml | 14 +- src/main/resources/logback.xml | 4 + .../doge/chatto/ApplicationController.scala | 6 +- .../wow/doge/chatto/control/UserBox2.scala | 12 ++ .../chatto/controller/ChatController.scala | 129 ++++++++++++++---- .../chatto/controller/LoginController.scala | 8 +- .../chatto/service/CustomSerializer.scala | 69 ++++++++++ .../wow/doge/chatto/service/UserService.scala | 45 +++++- 9 files changed, 251 insertions(+), 41 deletions(-) create mode 100644 src/main/scala/wow/doge/chatto/control/UserBox2.scala create mode 100644 src/main/scala/wow/doge/chatto/service/CustomSerializer.scala diff --git a/build.sbt b/build.sbt index 4bec638..0a4c549 100644 --- a/build.sbt +++ b/build.sbt @@ -42,7 +42,7 @@ libraryDependencies ++= Seq( "org.scalafx" %% "scalafx" % "12.0.2-R18", "org.scalafx" %% "scalafx-extras" % "0.3.4", "com.softwaremill.sttp.client" %% "json4s" % "2.1.1", - "org.json4s" %% "json4s-native" % "3.6.7", + "org.json4s" %% "json4s-jackson" % "3.6.8", "org.scala-lang.modules" %% "scala-async" % "0.10.0", "org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided, // "org.kordamp.ikonli" %% "ikonli-javafx" % "11.4.0", @@ -63,6 +63,9 @@ libraryDependencies += "com.jfoenix" % "jfoenix" % "9.0.9" // https://mvnrepository.com/artifact/org.kordamp.bootstrapfx/bootstrapfx-core libraryDependencies += "org.kordamp.bootstrapfx" % "bootstrapfx-core" % "0.2.4" +// https://mvnrepository.com/artifact/org.json4s/json4s-ext +libraryDependencies += "org.json4s" %% "json4s-ext" % "3.6.8" + enablePlugins(BuildInfoPlugin) buildInfoPackage := "wow.doge.chatto" diff --git a/src/main/resources/fxml/Chat.fxml b/src/main/resources/fxml/Chat.fxml index b6f981c..780ad91 100644 --- a/src/main/resources/fxml/Chat.fxml +++ b/src/main/resources/fxml/Chat.fxml @@ -1,7 +1,6 @@ - @@ -25,15 +24,24 @@
+ +
+ + + + +
+
-