Skip to content

Instantly share code, notes, and snippets.

@missingfaktor
Last active October 18, 2015 09:34
Show Gist options
  • Select an option

  • Save missingfaktor/d1020be84f588614b719 to your computer and use it in GitHub Desktop.

Select an option

Save missingfaktor/d1020be84f588614b719 to your computer and use it in GitHub Desktop.
data Response = SomethingWentWrong
| NoResults
| Result (Map IdType ResultType)
sealed trait Response
case object SomethingWentWrong extends Response
case object NoResults extends Response
case object Results(values: Map[IdType, ResultType]) extends Response
{ "tag": "something-went-wrong" }
{ "tag": "no-results" }
{ 
  "tag": "results",
  "values": {
    "q1": [3, 4, 9],
    "q2": [9, 11]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment