Guest User

Untitled

a guest
Oct 17th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. case class Result(mostMoney: String, mostHouses: String, leastCars: String)
  2.  
  3. val route =
  4. path("evaluation") {
  5. parameterMultiMap { params =>
  6. validator.createResult(Parser.startProcess(params.get(key).get))
  7. val result = Result(
  8. validator.answerQuestion(validator.Question.MONEY),
  9. validator.answerQuestion(validator.Question.HOUSE),
  10. validator.answerQuestion(validator.Question.CARS))
  11.  
  12. implicit val formats = Serialization.formats(NoTypeHints)
  13. val json = write(result)
  14. complete(json)
  15. }
  16. }
  17.  
  18. {"$outer":{"host":"localhost","port":8080},"mostMoney":Frank,"mostHouses":Patrick,"mostCars":"Jack"}
Add Comment
Please, Sign In to add comment