Implement JsonFormat[NodeSeq] like it was in IvyCache

This commit is contained in:
Dale Wijnand 2016-12-19 15:57:55 +00:00
parent 06c7f382ad
commit 946f307082
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
1 changed files with 4 additions and 1 deletions

View File

@ -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
)
}