JSON interpolation and identifier errors Follow
In my IDE settings (Linux IDEA 14.0.2, Scala plugin 1.2.1) I've set json interpolated String prefix to JSON -Language ID. Here's an example of using it:
def example(foos: List[Foo], limit: Int) = {
json"""
|{
| "size": $limit,
| "query": {
| "terms": { "foo.id": ${foos.map(_.id)} }
| }
|}
""".stripMargin.trim
}
The IDE highlights the usage of interpolated values (of type org.json4s.JValue) saying "JSON standard does not allow identifiers". I would expect that no errors would be shown for interpolated values.
Please sign in to leave a comment.