title: Parsing json with dynamic types in scala with lift-json
body: <p>I'm trying to write a JSON parse using lift-web and scala. I mapped my JSON to several case classes (for nested values/types), but I'm stuck with a MappingException error. This is the nested part of the JSON i'm trying to parse:</p>
  <pre><code>...
  &quot;attachments&quot;:[{&quot;8a7d22ff&quot;:&quot;Image1.png&quot;}],
  ...
  </code></pre>
  <p>for which I specified the following parameter in the case class</p>
  <pre><code>case class myType(
  ...
  
  attachments: List[(String,String)]
  ...
  )
  </code></pre>
  <p>Unfortunately, I got this message:</p>
  <pre><code>Caused by: net.liftweb.json.MappingException: Expected collection but got JObject(List(JField(8a7d22ff,JString(Image1.png)))) for root JObject(List(JField(8a7d22ff,JString(Image1.png)))) and mapping Constructor(TypeInfo(class scala.Tuple2,Some(class scala.Tuple2[class java.lang.String,class java.lang.String])),List(DeclaredConstructor(public scala.Tuple2(java.lang.Object,java.lang.Object),List(Arg(_1,Value(class java.lang.String),false), Arg(_2,Value(class java.lang.String),false)))))
      at net.liftweb.json.Meta$.fail(Meta.scala:227)
      at net.liftweb.json.Extraction$.newCollection$1(Extraction.scala:330)
      at net.liftweb.json.Extraction$.build$1(Extraction.scala:400)
      at net.liftweb.json.Extraction$.mkValue$1(Extraction.scala:431)
      ... 30 more
  </code></pre>
  <p>I also tried Map[String,String] but nothing, I do not really understand which datatype I've to put for parsing JSON with dynamic types...Any idea?</p>