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

sjsonnew.TupleFormats.scala Maven / Gradle / Ivy

The newest version!
// auto-generated by sbt-boilerplate
/*
 * Original implementation (C) 2009-2011 Debasish Ghosh
 * Adapted and extended in 2011 by Mathias Doenitz
 * Adapted and extended in 2016 by Eugene Yokota
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package sjsonnew

trait TupleFormats {
  private[this] type JF[A] = JsonFormat[A] // simple alias for reduced verbosity

  implicit def tuple1Format[A1](implicit A1: JF[A1]): JF[Tuple1[A1]] = new RootJsonFormat[Tuple1[A1]] {

    def write[J](t: Tuple1[A1], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple1[A1] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val xs = Tuple1(A1.read(Some(a1), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple1(A1.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple2Format[A1, A2](implicit A1: JF[A1], A2: JF[A2]): JF[Tuple2[A1, A2]] = new RootJsonFormat[Tuple2[A1, A2]] {

    def write[J](t: Tuple2[A1, A2], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple2[A1, A2] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val xs = Tuple2(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple2(A1.read(None, unbuilder), A2.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple3Format[A1, A2, A3](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3]): JF[Tuple3[A1, A2, A3]] = new RootJsonFormat[Tuple3[A1, A2, A3]] {

    def write[J](t: Tuple3[A1, A2, A3], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple3[A1, A2, A3] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val xs = Tuple3(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple3(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple4Format[A1, A2, A3, A4](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4]): JF[Tuple4[A1, A2, A3, A4]] = new RootJsonFormat[Tuple4[A1, A2, A3, A4]] {

    def write[J](t: Tuple4[A1, A2, A3, A4], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple4[A1, A2, A3, A4] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val xs = Tuple4(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple4(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple5Format[A1, A2, A3, A4, A5](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5]): JF[Tuple5[A1, A2, A3, A4, A5]] = new RootJsonFormat[Tuple5[A1, A2, A3, A4, A5]] {

    def write[J](t: Tuple5[A1, A2, A3, A4, A5], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple5[A1, A2, A3, A4, A5] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val xs = Tuple5(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple5(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple6Format[A1, A2, A3, A4, A5, A6](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6]): JF[Tuple6[A1, A2, A3, A4, A5, A6]] = new RootJsonFormat[Tuple6[A1, A2, A3, A4, A5, A6]] {

    def write[J](t: Tuple6[A1, A2, A3, A4, A5, A6], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple6[A1, A2, A3, A4, A5, A6] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val xs = Tuple6(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple6(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple7Format[A1, A2, A3, A4, A5, A6, A7](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7]): JF[Tuple7[A1, A2, A3, A4, A5, A6, A7]] = new RootJsonFormat[Tuple7[A1, A2, A3, A4, A5, A6, A7]] {

    def write[J](t: Tuple7[A1, A2, A3, A4, A5, A6, A7], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple7[A1, A2, A3, A4, A5, A6, A7] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val xs = Tuple7(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple7(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple8Format[A1, A2, A3, A4, A5, A6, A7, A8](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8]): JF[Tuple8[A1, A2, A3, A4, A5, A6, A7, A8]] = new RootJsonFormat[Tuple8[A1, A2, A3, A4, A5, A6, A7, A8]] {

    def write[J](t: Tuple8[A1, A2, A3, A4, A5, A6, A7, A8], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple8[A1, A2, A3, A4, A5, A6, A7, A8] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val xs = Tuple8(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple8(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple9Format[A1, A2, A3, A4, A5, A6, A7, A8, A9](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9]): JF[Tuple9[A1, A2, A3, A4, A5, A6, A7, A8, A9]] = new RootJsonFormat[Tuple9[A1, A2, A3, A4, A5, A6, A7, A8, A9]] {

    def write[J](t: Tuple9[A1, A2, A3, A4, A5, A6, A7, A8, A9], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple9[A1, A2, A3, A4, A5, A6, A7, A8, A9] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val xs = Tuple9(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple9(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple10Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10]): JF[Tuple10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10]] = new RootJsonFormat[Tuple10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10]] {

    def write[J](t: Tuple10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val xs = Tuple10(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple10(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple11Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11]): JF[Tuple11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11]] = new RootJsonFormat[Tuple11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11]] {

    def write[J](t: Tuple11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val xs = Tuple11(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple11(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple12Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12]): JF[Tuple12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12]] = new RootJsonFormat[Tuple12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12]] {

    def write[J](t: Tuple12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple12[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val xs = Tuple12(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple12(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple13Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13]): JF[Tuple13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13]] = new RootJsonFormat[Tuple13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13]] {

    def write[J](t: Tuple13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple13[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val xs = Tuple13(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple13(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple14Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14]): JF[Tuple14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14]] = new RootJsonFormat[Tuple14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14]] {

    def write[J](t: Tuple14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple14[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val xs = Tuple14(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple14(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple15Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14], A15: JF[A15]): JF[Tuple15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15]] = new RootJsonFormat[Tuple15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15]] {

    def write[J](t: Tuple15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      A15.write(t._15, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple15[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val a15 = unbuilder.nextElement
          val xs = Tuple15(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder), A15.read(Some(a15), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple15(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder), A15.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple16Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14], A15: JF[A15], A16: JF[A16]): JF[Tuple16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16]] = new RootJsonFormat[Tuple16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16]] {

    def write[J](t: Tuple16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      A15.write(t._15, builder)
      A16.write(t._16, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple16[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val a15 = unbuilder.nextElement
          val a16 = unbuilder.nextElement
          val xs = Tuple16(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder), A15.read(Some(a15), unbuilder), A16.read(Some(a16), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple16(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder), A15.read(None, unbuilder), A16.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple17Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14], A15: JF[A15], A16: JF[A16], A17: JF[A17]): JF[Tuple17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17]] = new RootJsonFormat[Tuple17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17]] {

    def write[J](t: Tuple17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      A15.write(t._15, builder)
      A16.write(t._16, builder)
      A17.write(t._17, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple17[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val a15 = unbuilder.nextElement
          val a16 = unbuilder.nextElement
          val a17 = unbuilder.nextElement
          val xs = Tuple17(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder), A15.read(Some(a15), unbuilder), A16.read(Some(a16), unbuilder), A17.read(Some(a17), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple17(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder), A15.read(None, unbuilder), A16.read(None, unbuilder), A17.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple18Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14], A15: JF[A15], A16: JF[A16], A17: JF[A17], A18: JF[A18]): JF[Tuple18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18]] = new RootJsonFormat[Tuple18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18]] {

    def write[J](t: Tuple18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      A15.write(t._15, builder)
      A16.write(t._16, builder)
      A17.write(t._17, builder)
      A18.write(t._18, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val a15 = unbuilder.nextElement
          val a16 = unbuilder.nextElement
          val a17 = unbuilder.nextElement
          val a18 = unbuilder.nextElement
          val xs = Tuple18(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder), A15.read(Some(a15), unbuilder), A16.read(Some(a16), unbuilder), A17.read(Some(a17), unbuilder), A18.read(Some(a18), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple18(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder), A15.read(None, unbuilder), A16.read(None, unbuilder), A17.read(None, unbuilder), A18.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple19Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14], A15: JF[A15], A16: JF[A16], A17: JF[A17], A18: JF[A18], A19: JF[A19]): JF[Tuple19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19]] = new RootJsonFormat[Tuple19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19]] {

    def write[J](t: Tuple19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      A15.write(t._15, builder)
      A16.write(t._16, builder)
      A17.write(t._17, builder)
      A18.write(t._18, builder)
      A19.write(t._19, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val a15 = unbuilder.nextElement
          val a16 = unbuilder.nextElement
          val a17 = unbuilder.nextElement
          val a18 = unbuilder.nextElement
          val a19 = unbuilder.nextElement
          val xs = Tuple19(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder), A15.read(Some(a15), unbuilder), A16.read(Some(a16), unbuilder), A17.read(Some(a17), unbuilder), A18.read(Some(a18), unbuilder), A19.read(Some(a19), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple19(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder), A15.read(None, unbuilder), A16.read(None, unbuilder), A17.read(None, unbuilder), A18.read(None, unbuilder), A19.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple20Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14], A15: JF[A15], A16: JF[A16], A17: JF[A17], A18: JF[A18], A19: JF[A19], A20: JF[A20]): JF[Tuple20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20]] = new RootJsonFormat[Tuple20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20]] {

    def write[J](t: Tuple20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      A15.write(t._15, builder)
      A16.write(t._16, builder)
      A17.write(t._17, builder)
      A18.write(t._18, builder)
      A19.write(t._19, builder)
      A20.write(t._20, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val a15 = unbuilder.nextElement
          val a16 = unbuilder.nextElement
          val a17 = unbuilder.nextElement
          val a18 = unbuilder.nextElement
          val a19 = unbuilder.nextElement
          val a20 = unbuilder.nextElement
          val xs = Tuple20(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder), A15.read(Some(a15), unbuilder), A16.read(Some(a16), unbuilder), A17.read(Some(a17), unbuilder), A18.read(Some(a18), unbuilder), A19.read(Some(a19), unbuilder), A20.read(Some(a20), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple20(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder), A15.read(None, unbuilder), A16.read(None, unbuilder), A17.read(None, unbuilder), A18.read(None, unbuilder), A19.read(None, unbuilder), A20.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple21Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14], A15: JF[A15], A16: JF[A16], A17: JF[A17], A18: JF[A18], A19: JF[A19], A20: JF[A20], A21: JF[A21]): JF[Tuple21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21]] = new RootJsonFormat[Tuple21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21]] {

    def write[J](t: Tuple21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      A15.write(t._15, builder)
      A16.write(t._16, builder)
      A17.write(t._17, builder)
      A18.write(t._18, builder)
      A19.write(t._19, builder)
      A20.write(t._20, builder)
      A21.write(t._21, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val a15 = unbuilder.nextElement
          val a16 = unbuilder.nextElement
          val a17 = unbuilder.nextElement
          val a18 = unbuilder.nextElement
          val a19 = unbuilder.nextElement
          val a20 = unbuilder.nextElement
          val a21 = unbuilder.nextElement
          val xs = Tuple21(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder), A15.read(Some(a15), unbuilder), A16.read(Some(a16), unbuilder), A17.read(Some(a17), unbuilder), A18.read(Some(a18), unbuilder), A19.read(Some(a19), unbuilder), A20.read(Some(a20), unbuilder), A21.read(Some(a21), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple21(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder), A15.read(None, unbuilder), A16.read(None, unbuilder), A17.read(None, unbuilder), A18.read(None, unbuilder), A19.read(None, unbuilder), A20.read(None, unbuilder), A21.read(None, unbuilder))
          xs
      }
  }
  implicit def tuple22Format[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22](implicit A1: JF[A1], A2: JF[A2], A3: JF[A3], A4: JF[A4], A5: JF[A5], A6: JF[A6], A7: JF[A7], A8: JF[A8], A9: JF[A9], A10: JF[A10], A11: JF[A11], A12: JF[A12], A13: JF[A13], A14: JF[A14], A15: JF[A15], A16: JF[A16], A17: JF[A17], A18: JF[A18], A19: JF[A19], A20: JF[A20], A21: JF[A21], A22: JF[A22]): JF[Tuple22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22]] = new RootJsonFormat[Tuple22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22]] {

    def write[J](t: Tuple22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22], builder: Builder[J]): Unit = {
      builder.beginArray()
      A1.write(t._1, builder)
      A2.write(t._2, builder)
      A3.write(t._3, builder)
      A4.write(t._4, builder)
      A5.write(t._5, builder)
      A6.write(t._6, builder)
      A7.write(t._7, builder)
      A8.write(t._8, builder)
      A9.write(t._9, builder)
      A10.write(t._10, builder)
      A11.write(t._11, builder)
      A12.write(t._12, builder)
      A13.write(t._13, builder)
      A14.write(t._14, builder)
      A15.write(t._15, builder)
      A16.write(t._16, builder)
      A17.write(t._17, builder)
      A18.write(t._18, builder)
      A19.write(t._19, builder)
      A20.write(t._20, builder)
      A21.write(t._21, builder)
      A22.write(t._22, builder)
      builder.endArray()
    }
    def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): Tuple22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22] =
      jsOpt match {
        case Some(js) =>
          unbuilder.beginArray(js)
          val a1 = unbuilder.nextElement
          val a2 = unbuilder.nextElement
          val a3 = unbuilder.nextElement
          val a4 = unbuilder.nextElement
          val a5 = unbuilder.nextElement
          val a6 = unbuilder.nextElement
          val a7 = unbuilder.nextElement
          val a8 = unbuilder.nextElement
          val a9 = unbuilder.nextElement
          val a10 = unbuilder.nextElement
          val a11 = unbuilder.nextElement
          val a12 = unbuilder.nextElement
          val a13 = unbuilder.nextElement
          val a14 = unbuilder.nextElement
          val a15 = unbuilder.nextElement
          val a16 = unbuilder.nextElement
          val a17 = unbuilder.nextElement
          val a18 = unbuilder.nextElement
          val a19 = unbuilder.nextElement
          val a20 = unbuilder.nextElement
          val a21 = unbuilder.nextElement
          val a22 = unbuilder.nextElement
          val xs = Tuple22(A1.read(Some(a1), unbuilder), A2.read(Some(a2), unbuilder), A3.read(Some(a3), unbuilder), A4.read(Some(a4), unbuilder), A5.read(Some(a5), unbuilder), A6.read(Some(a6), unbuilder), A7.read(Some(a7), unbuilder), A8.read(Some(a8), unbuilder), A9.read(Some(a9), unbuilder), A10.read(Some(a10), unbuilder), A11.read(Some(a11), unbuilder), A12.read(Some(a12), unbuilder), A13.read(Some(a13), unbuilder), A14.read(Some(a14), unbuilder), A15.read(Some(a15), unbuilder), A16.read(Some(a16), unbuilder), A17.read(Some(a17), unbuilder), A18.read(Some(a18), unbuilder), A19.read(Some(a19), unbuilder), A20.read(Some(a20), unbuilder), A21.read(Some(a21), unbuilder), A22.read(Some(a22), unbuilder))
          unbuilder.endArray()
          xs
        case None =>
          val xs = Tuple22(A1.read(None, unbuilder), A2.read(None, unbuilder), A3.read(None, unbuilder), A4.read(None, unbuilder), A5.read(None, unbuilder), A6.read(None, unbuilder), A7.read(None, unbuilder), A8.read(None, unbuilder), A9.read(None, unbuilder), A10.read(None, unbuilder), A11.read(None, unbuilder), A12.read(None, unbuilder), A13.read(None, unbuilder), A14.read(None, unbuilder), A15.read(None, unbuilder), A16.read(None, unbuilder), A17.read(None, unbuilder), A18.read(None, unbuilder), A19.read(None, unbuilder), A20.read(None, unbuilder), A21.read(None, unbuilder), A22.read(None, unbuilder))
          xs
      }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy