Scala JSON4S用于理解 - 无法解析符号FlatMap
我想使用 JValue 类型的输入/返回值进行理解,该值是在 json4s 中定义的。以下代码片段:
def func1(...):org.json4s.JValue
def func2(val1:org.json4s.JValue):...
for {
aJValue <- func1(...)
whatever <- func2(aJValue)
} yield (wathever)
产生编译器错误
无法解析符号 flatMap
第一个“<-”符号处的符号 flatMap。如何解决这个问题?
非常感谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论