@@ -42,7 +42,7 @@ trait StandardFormats {
4242 def readSome (value : JsValue ) = Some (value.convertTo[T ])
4343 }
4444
45- implicit def eitherFormat [A : JF , B : JF ] = new JF [Either [A , B ]] {
45+ implicit def eitherFormat [A : JF , B : JF ]: JF [ Either [ A , B ]] = new JF [Either [A , B ]] {
4646 def write (either : Either [A , B ]) = either match {
4747 case Right (a) => a.toJson
4848 case Left (b) => b.toJson
@@ -55,36 +55,36 @@ trait StandardFormats {
5555 }
5656 }
5757
58- implicit def tuple1Format [A : JF ] = new JF [Tuple1 [A ]] {
58+ implicit def tuple1Format [A : JF ]: JF [ Tuple1 [ A ]] = new JF [Tuple1 [A ]] {
5959 def write (t : Tuple1 [A ]) = t._1.toJson
6060 def read (value : JsValue ) = Tuple1 (value.convertTo[A ])
6161 }
6262
63- implicit def tuple2Format [A : JF , B : JF ] = new RootJsonFormat [(A , B )] {
63+ implicit def tuple2Format [A : JF , B : JF ]: RootJsonFormat [( A , B )] = new RootJsonFormat [(A , B )] {
6464 def write (t : (A , B )) = JsArray (t._1.toJson, t._2.toJson)
6565 def read (value : JsValue ) = value match {
6666 case JsArray (Seq (a, b)) => (a.convertTo[A ], b.convertTo[B ])
6767 case x => deserializationError(" Expected Tuple2 as JsArray, but got " + x)
6868 }
6969 }
7070
71- implicit def tuple3Format [A : JF , B : JF , C : JF ] = new RootJsonFormat [(A , B , C )] {
71+ implicit def tuple3Format [A : JF , B : JF , C : JF ]: RootJsonFormat [( A , B , C )] = new RootJsonFormat [(A , B , C )] {
7272 def write (t : (A , B , C )) = JsArray (t._1.toJson, t._2.toJson, t._3.toJson)
7373 def read (value : JsValue ) = value match {
7474 case JsArray (Seq (a, b, c)) => (a.convertTo[A ], b.convertTo[B ], c.convertTo[C ])
7575 case x => deserializationError(" Expected Tuple3 as JsArray, but got " + x)
7676 }
7777 }
7878
79- implicit def tuple4Format [A : JF , B : JF , C : JF , D : JF ] = new RootJsonFormat [(A , B , C , D )] {
79+ implicit def tuple4Format [A : JF , B : JF , C : JF , D : JF ]: RootJsonFormat [( A , B , C , D )] = new RootJsonFormat [(A , B , C , D )] {
8080 def write (t : (A , B , C , D )) = JsArray (t._1.toJson, t._2.toJson, t._3.toJson, t._4.toJson)
8181 def read (value : JsValue ) = value match {
8282 case JsArray (Seq (a, b, c, d)) => (a.convertTo[A ], b.convertTo[B ], c.convertTo[C ], d.convertTo[D ])
8383 case x => deserializationError(" Expected Tuple4 as JsArray, but got " + x)
8484 }
8585 }
8686
87- implicit def tuple5Format [A : JF , B : JF , C : JF , D : JF , E : JF ] = {
87+ implicit def tuple5Format [A : JF , B : JF , C : JF , D : JF , E : JF ]: RootJsonFormat [( A , B , C , D , E )] = {
8888 new RootJsonFormat [(A , B , C , D , E )] {
8989 def write (t : (A , B , C , D , E )) = JsArray (t._1.toJson, t._2.toJson, t._3.toJson, t._4.toJson, t._5.toJson)
9090 def read (value : JsValue ) = value match {
@@ -95,7 +95,7 @@ trait StandardFormats {
9595 }
9696 }
9797
98- implicit def tuple6Format [A : JF , B : JF , C : JF , D : JF , E : JF , F : JF ] = {
98+ implicit def tuple6Format [A : JF , B : JF , C : JF , D : JF , E : JF , F : JF ]: RootJsonFormat [( A , B , C , D , E , F )] = {
9999 new RootJsonFormat [(A , B , C , D , E , F )] {
100100 def write (t : (A , B , C , D , E , F )) = JsArray (t._1.toJson, t._2.toJson, t._3.toJson, t._4.toJson, t._5.toJson, t._6.toJson)
101101 def read (value : JsValue ) = value match {
@@ -106,7 +106,7 @@ trait StandardFormats {
106106 }
107107 }
108108
109- implicit def tuple7Format [A : JF , B : JF , C : JF , D : JF , E : JF , F : JF , G : JF ] = {
109+ implicit def tuple7Format [A : JF , B : JF , C : JF , D : JF , E : JF , F : JF , G : JF ]: RootJsonFormat [( A , B , C , D , E , F , G )] = {
110110 new RootJsonFormat [(A , B , C , D , E , F , G )] {
111111 def write (t : (A , B , C , D , E , F , G )) = JsArray (t._1.toJson, t._2.toJson, t._3.toJson, t._4.toJson, t._5.toJson, t._6.toJson, t._7.toJson)
112112 def read (value : JsValue ) = value match {
0 commit comments