rapture icon indicating copy to clipboard operation
rapture copied to clipboard

The "json" method can not be used

Open yilaguan opened this issue 8 years ago • 1 comments

Hi, When I use the method "json" as follow:

import rapture.json._
import rapture.json.jsonBackends.spray._
val test = json"""{"platform":"ios", "app_key":"KEY_1"}"""
println(test)

I got a error as follow:

Error:(94, 16) value json is not a member of StringContext
    val test = json"""{"platform":"ios", "app_key":"KEY_1"}"""

How can I deal with this problem?Thank you!

yilaguan avatar Aug 24 '16 09:08 yilaguan

i think it's a problem related to the order of the imports. If you switch them it works fine:

import rapture.json.jsonBackends.spray._
import rapture.json._
val test = json"""{"platform":"ios", "app_key":"KEY_1"}"""
println(test)

johannegger avatar Sep 22 '16 17:09 johannegger