Skip to content

Instantly share code, notes, and snippets.

@patryk-scalac-io
Created June 15, 2017 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patryk-scalac-io/d28e3a573274734824fe0c4a1cdbf217 to your computer and use it in GitHub Desktop.
Save patryk-scalac-io/d28e3a573274734824fe0c4a1cdbf217 to your computer and use it in GitHub Desktop.
val someJson: Json = JStr("someString")
someJson match {
case JStr(s) => JStr(s.toUpperCase)
case anythingElse => anythingElse
}
// res1: com.example.Json = JStr(SOMESTRING)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment