February 2017
Beginner to intermediate
1100 pages
25h 19m
English
In the previous sections, we extracted specific fields from the JSON response using Scala extractors. We can do one better and extract full case classes.
When moving beyond the REPL, programming best practice dictates that we move from json4s types to Scala objects as soon as possible rather than passing json4s types around the program. Converting from json4s types to Scala types (or case classes representing domain objects) is good practice because:
JObject is, as far as the compiler is concerned, always a JObject, whatever fields it contains. By contrast, the compiler ...Read now
Unlock full access