Parse JSON from result of Regex check?

I need to Parse JSON pulled out of a HTML body via a Regex (the request response is not JSON, but there is JSON buried in it as part of an embedded JS script snippet). I previously in Gatling 1.x used Rapture IO libraries to do this, but since there’s some built in JSON in Gatling 2.x now can I make use of it?

It looks like I need to use io.gatling.core.json.JsonParsers.safeParse() but I’m not exactly a Scala expert and seem to be having trouble doing so.

I’ve tried to import both io.gatling.core.json.JsonParsers and io.gatling.core.json.JsonParsers._, but trying to use JsonParser.safeParse() or safeParse() results in ‘not found’ errors. I also tried creating a val jsonParser = JsonParsers, val jsonParser = new JsonParsers() … I’m not sure how to make use of it.