September 2018
Intermediate to advanced
398 pages
9h 43m
English
First, we can start by defining a case class that represents the same data as in our JSON payload. Create a new package, coinyser, and then a class, coinyser.HttpTransaction, in src/main/scala:
package coinysercase class HttpTransaction(date: String, tid: String, price: String, `type`: String, amount: String)
This class has the same attribute names with the same types (all string) as the JSON objects. The first step is to implement a function that transforms a JSON string into Dataset[HttpTransaction]. For this purpose, ...
Read now
Unlock full access