mirror of https://github.com/sbt/sbt.git
Provide JValue pass-through
This commit is contained in:
parent
7edc5c47c8
commit
ddb6a13feb
|
|
@ -42,8 +42,13 @@ trait JValueFormats { self: sjsonnew.BasicJsonProtocol =>
|
|||
}
|
||||
}
|
||||
|
||||
// This passes through JValue, or returns JNull instead of blowing up with unimplemented.
|
||||
implicit lazy val JValueJsonReader: JR[JValue] = new JR[JValue] {
|
||||
def read[J](j: Option[J], u: Unbuilder[J]) = ??? // Is this even possible? with no Manifest[J]?
|
||||
def read[J](j: Option[J], u: Unbuilder[J]) = j match {
|
||||
case Some(x: JValue) => x
|
||||
case Some(x) => sys.error(s"Uknown AST $x")
|
||||
case _ => JNull
|
||||
}
|
||||
}
|
||||
|
||||
implicit lazy val JValueFormat: JF[JValue] =
|
||||
|
|
|
|||
Loading…
Reference in New Issue