Parse json body

Hi, I am new to scala and working on writing a json body-parser. I am trying to use spray-json_2.11 and play-json_2.11, but I can’t parse this json:

[
  {
    "name": "MathJax",
    "slug": "",
    "categories": [
      {
        "id": 25,
        "slug": "javascript-graphics",
        "name": "JavaScript graphics",
        "priority": 6
      }
    ],
    "confidence": 100,
    "version": "2.7.1",
    "icon": "MathJax.png",
    "website": "https://www.mathjax.org",
    "cpe": "cpe:/a:mathjax:mathjax"
  },
  {
    "name": "YouTube",
    "slug": "youtube",
    "categories": [
      {
        "id": 14,
        "slug": "video-players",
        "name": "Video players",
        "priority": 7
      }
    ],
    "confidence": 100,
    "version": "",
    "icon": "YouTube.png",
    "website": "http://www.youtube.com",
    "cpe": null
  }
]

Try to include error-messages and more info when asking “This doesn’t work” type of questions.

2 Likes