Skip to content

Instantly share code, notes, and snippets.

@Korilakkuma
Last active October 28, 2015 01:08
Show Gist options
  • Save Korilakkuma/cb2b3764e63a7129d3d4 to your computer and use it in GitHub Desktop.
Save Korilakkuma/cb2b3764e63a7129d3d4 to your computer and use it in GitHub Desktop.
JSON by Play Framework
import play.api.libs.json.Json
val json = Json.stringify(Json.obj("threshold" -> 10))
val parsedJson = Json.parse(json)
val threshold = (parsedJson \"threshold").asOpt[Int].get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment