In json4s, code can be written like this:
import org.json4s._
import org.json4s.jackson.JsonMethods._
...
val x: MonadicJValue = JObject()
This is correct because the function
implicit def jvalue2monadic(jv: JValue) = new MonadicJValue(jv)
is imported to the scope by the first import org.json4s._
line.
(source of jvalue2monadic defination on github)
However, I tried another segment of codes and it works well too:
import org.json4s.{JObject, MonadicJValue}
import org.json4s.jackson.JsonMethods.parse
...
val x: MonadicJValue = JObject()
Since the implicit function is not imported to this scope, I don't know how it works!