Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. { "key0" :[{
  2. "key1": "34",
  3. "key2": "34",
  4. "key3": {
  5. "key3_1": "0",
  6. "key3_2": "0"
  7. },
  8. "key4": "56" },
  9. {
  10. "key1": "14",
  11. "key2": "78",
  12. "key3": {
  13. "key3_1": "0",
  14. "key3_2": "0"
  15. },
  16. "key4": "676"
  17. }]
  18. "key2": "value2"
  19. }
  20.  
  21. implicit val contentReader = (
  22. (__ "key0").read[List[Map[String, String]]] and
  23. (__ "key4").read[String]
  24. )(Content)
  25.  
  26. val json : JsValue = Json.parse(content)
  27. val contentResult = json.as[Content]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement