mirror of https://github.com/sbt/sbt.git
Implement JsonFormat[NodeSeq] like it was in IvyCache
This commit is contained in:
parent
06c7f382ad
commit
946f307082
|
|
@ -4,5 +4,8 @@ import sjsonnew._
|
|||
import scala.xml._
|
||||
|
||||
trait NodeSeqFormat { self: BasicJsonProtocol =>
|
||||
implicit lazy val NodeSeqFormat: JsonFormat[NodeSeq] = ???
|
||||
implicit lazy val NodeSeqFormat: JsonFormat[NodeSeq] = project[NodeSeq, String](
|
||||
xml => <binary>{ xml }</binary>.toString,
|
||||
str => XML.loadString(str).child
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue