From ddb6a13febf38814ef2e8858fda2b182747ebb8c Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sun, 24 Sep 2017 06:36:18 -0400 Subject: [PATCH] Provide JValue pass-through --- .../main/scala/sbt/internal/util/codec/JValueFormats.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/util-logging/src/main/scala/sbt/internal/util/codec/JValueFormats.scala b/internal/util-logging/src/main/scala/sbt/internal/util/codec/JValueFormats.scala index c0c79f7d1..5d8d58146 100644 --- a/internal/util-logging/src/main/scala/sbt/internal/util/codec/JValueFormats.scala +++ b/internal/util-logging/src/main/scala/sbt/internal/util/codec/JValueFormats.scala @@ -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] =