scala json4s in for comprehension - cannot resolve symbol flatMap

111 Views Asked by At

I would like to use functions in for-comprehension with input/return values of type JValue, that is defined within json4s. The following snippet:

def func1(...):org.json4s.JValue
def func2(val1:org.json4s.JValue):...

for {
  aJValue <- func1(...) 
  whatever <- func2(aJValue) 
} yield (wathever)

yields the compiler error

Cannot resolve symbol flatMap

at the first "<-" symbol. How to fix this?

Many Thanks!

0

There are 0 best solutions below