Scala for expression pattern matching (with JSON)