title: Scala - How to implement implicit JSON reader
body: <p>I've implemented implicit Json Reads in order to read two fields from JSON, saleId and saleType. I wanted to make getSales method return a tuple (Int, String) representing saleId and saleType accordingly. But when I call the <code>getSales</code> method  I'm getting the following errors: </p>
  
  <pre><code>Error:(46, 79) No JSON deserializer found for type (Int, String). Try to implement an implicit Reader or JsonFormat for this type.
      val salesData = (salesJson \ "sales").as[(Int, String)]
  
  Error:(46, 79) not enough arguments for method as: (implicit reader: org.json4s.Reader[(Int, String)], implicit mf: Manifest[(Int, String)])(Int, String).
  Unspecified value parameters reader, mf.
      val salesData = (salesJson \ "sales").as[(Int, String)]
  </code></pre>
  
  <p>I have implemented implicit Json Reads so really confused with the first error. Here is my implementation:</p>
  
  <pre><code>def getsales(context: SparkContext, saleId: Int): (Int, String)= {
      val url= buildUrl(context, saleId)
  
      implicit val salesReader: Reads[(Int, String)] = (
        (__ \ "id_from_API").read[Int] and
          (__ \ "sale_type").read[String]
        ).tupled
  
      val salesJson: JValue = parse(httpStringResponse(url, context))
      val salesData = (salesJson \ "sales_stats").as[(Int, String)]
  
      salesData
  }
  </code></pre>