All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sbt.internal.bsp.codec.ScalaWorkspaceEditFormats.scala Maven / Gradle / Ivy

The newest version!
/**
 * 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 ScalaWorkspaceEditFormats { self: sbt.internal.bsp.codec.ScalaTextEditFormats with sbt.internal.bsp.codec.RangeFormats with sbt.internal.bsp.codec.PositionFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val ScalaWorkspaceEditFormat: JsonFormat[sbt.internal.bsp.ScalaWorkspaceEdit] = new JsonFormat[sbt.internal.bsp.ScalaWorkspaceEdit] {
  override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.internal.bsp.ScalaWorkspaceEdit = {
    __jsOpt match {
      case Some(__js) =>
      unbuilder.beginObject(__js)
      val changes = unbuilder.readField[Vector[sbt.internal.bsp.ScalaTextEdit]]("changes")
      unbuilder.endObject()
      sbt.internal.bsp.ScalaWorkspaceEdit(changes)
      case None =>
      deserializationError("Expected JsObject but found None")
    }
  }
  override def write[J](obj: sbt.internal.bsp.ScalaWorkspaceEdit, builder: Builder[J]): Unit = {
    builder.beginObject()
    builder.addField("changes", obj.changes)
    builder.endObject()
  }
}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy