title: Spray-json convert part of the json to Map[String,List[Double]]
body: <p>I have the following json</p>
  
  <pre><code>   {  
         "op":{  
            "samples":{  
               "ep_mem_high_wat":[  0,0,0,0,0,0,0],
               "ep_mem_low_wat":[  0,0,0,0,0,0,0]
            },
            "samplesCount":60,
            "isPersistent":true,
            "lastTStamp":1415619627689,
            "interval":1000
         },
         "hot_keys":[  
            {  
               "name":"counter::F03E91E2A4B9C25F",
               "ops":0.11010372549516878
            }
         ]
      }
  </code></pre>
  
  <p>I would like to parse "samples" property of this Json as Map[String,List[Double]] as </p>
  
  <pre><code>Map[String,List[Double]]("ep_mem_high_wat" -&gt; [ 0,0,0,0,0,0,0],"ep_mem_low_wat" -&gt; [0,0,0,0,0,0,0])
  </code></pre>
  
  <p>For this purpose I perform the following: I create my case classes</p>
  
  <pre><code>  case class Samples(properties:Map[String,List[Double]])
    case class Op(samples:Samples,samplesCount:Int,isPersistent:Boolean,lastTStamp:Long,interval:Int)
    case class Key(name:String,ops:Double)
    case class BucketStatisticResponse(op:Op,hot_keys:List[Key])
  </code></pre>
  
  <p>and then I create custom Json protocol</p>
  
  <pre><code> object BucketStatisticJsonProtocol extends DefaultJsonProtocol {
  
      implicit object SamplesJsonFormat extends RootJsonFormat[Samples] {
  
        def write(obj: Samples) = obj.toJson
        def read(value: JsValue) =  {
           val props = value.asJsObject.fields
            Samples(value.convertTo[Map[String,List[Double]]])
        }
      }
      implicit val keyFormat = jsonFormat2(Key)
      implicit val opFormat = jsonFormat5(Op)
      implicit val bucketStatisticFormat= jsonFormat2(BucketStatisticResponse)
    }
  </code></pre>
  
  <p>And then I'm trying to parse json</p>
  
  <pre><code> import BucketStatisticJsonProtocol._
   val res =  json.toJson.convertTo[BucketStatisticResponse]
  </code></pre>
  
  <p>As the result I'm gettign the folloing exception:</p>
  
  <pre><code>Exception in thread "main" spray.json.DeserializationException: Object expected in field 'op'
      at spray.json.package$.deserializationError(package.scala:23)
      at spray.json.ProductFormats$class.fromField(ProductFormats.scala:54)
      at high.availability.poc.DynamicJson$BucketStatisticJsonProtocol$.fromField(DynamicJson.scala:23)
  </code></pre>
  
  <p>What am I doing wrong?</p>