![JAR search and dependency download from the Maven repository](/logo.png)
sbt.internal.bsp.codec.DiagnosticRelatedInformationFormats.scala Maven / Gradle / Ivy
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.internal.bsp.codec
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait DiagnosticRelatedInformationFormats { self: sbt.internal.bsp.codec.LocationFormats with sbt.internal.bsp.codec.RangeFormats with sbt.internal.bsp.codec.PositionFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val DiagnosticRelatedInformationFormat: JsonFormat[sbt.internal.bsp.DiagnosticRelatedInformation] = new JsonFormat[sbt.internal.bsp.DiagnosticRelatedInformation] {
override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.internal.bsp.DiagnosticRelatedInformation = {
__jsOpt match {
case Some(__js) =>
unbuilder.beginObject(__js)
val location = unbuilder.readField[sbt.internal.bsp.Location]("location")
val message = unbuilder.readField[String]("message")
unbuilder.endObject()
sbt.internal.bsp.DiagnosticRelatedInformation(location, message)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.internal.bsp.DiagnosticRelatedInformation, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("location", obj.location)
builder.addField("message", obj.message)
builder.endObject()
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy