How should I specify the type of JSON-like unstructured data in Scala?

You're spot on that you want some sort of case classes to model your datatypes. In functional languages these sorts of things are called "Abstract Data Types", and you can read all about how Haskell uses them by Googling around a bit. Scala's equivalent of Haskell's ADTs uses sealed traits and case classes.

Well, there are a couple ways to approach this. I would probably just use MapString, Any, which should work just fine for your purposes (as long as the map is from collection. Immutable rather than collection.

Mutable). However, if you really want to go through some pain, it is possible to give a type for this.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions