Thanks for your work on this project, it's very nice! I've faced a problem when trying to parse the following JSON (output from CouchDb):
{
"_id":"481e7e36693c1ae3f1871be7e506aade",
"_rev":"2-7bc08b6426dd0a165d9c7d1f9e08aad5",
"name":"Alice",
"age":25,
"_attachments":{
"attachment":{
"content_type":"application/octet-stream",
"revpos":2,
"digest":"md5-boWfl561SDppW4MTLQhVyA==",
"length":5,
"stub":true
}
}
}
abstract class CouchDoc {
val _id: String
val _rev: String
val _attachments: Map[String, CouchAttachment]
}
case class CouchAttachment(
content_type: String,
revpos: Int,
digest: String,
length: Int,
stub: Boolean)
case class Person(
name: String,
age: Int,
_id: String,
_rev: String,
_attachments: Map[String, CouchAttachment] = Map()) extends CouchDoc
data: Obj(ArrayBuffer((attachment,Obj(ArrayBuffer((content_type,Str(application/octet-stream)), (revpos,Num(2.0)), (digest,Str(md5-boWfl561SDppW4MTLQhVyA==)), (length,Num(5.0)), (stub,True)))))) msg: Array(n)
upickle.Invalid$Data: data: Obj(ArrayBuffer((attachment,Obj(ArrayBuffer((content_type,Str(application/octet-stream)), (revpos,Num(2.0)), (digest,Str(md5-boWfl561SDppW4MTLQhVyA==)), (length,Num(5.0)), (stub,True)))))) msg: Array(n)
at upickle.Implicits$$anonfun$validate$1.applyOrElse(Implicits.scala:16)
at upickle.Implicits$$anonfun$validate$1.applyOrElse(Implicits.scala:16)
at upickle.Implicits$$anonfun$MapR$1.applyOrElse(Implicits.scala:109)
at upickle.Implicits$$anonfun$MapR$1.applyOrElse(Implicits.scala:109)
at upickle.Reader$$anonfun$read$1.applyOrElse(Types.scala:42)
at upickle.Reader$$anonfun$read$1.applyOrElse(Types.scala:42)
at upickle.Types$class.readJs(Types.scala:139)
at upickle.package$.readJs(package.scala:10)
at upickle.Generated$$anonfun$Tuple5R$1.applyOrElse(Generated.scala:49)
at upickle.Generated$$anonfun$Tuple5R$1.applyOrElse(Generated.scala:49)
at upickle.Reader$$anonfun$read$1.applyOrElse(Types.scala:42)
at upickle.Reader$$anonfun$read$1.applyOrElse(Types.scala:42)
at upickle.Types$class.readJs(Types.scala:139)
at upickle.package$.readJs(package.scala:10)
at upickle.Generated$InternalGenerated$$anonfun$Case5R$1.applyOrElse(Generated.scala:233)
at upickle.Generated$InternalGenerated$$anonfun$Case5R$1.applyOrElse(Generated.scala:233)
at upickle.GeneratedUtil$$anonfun$readerCaseFunction$1.applyOrElse(GeneratedUtil.scala:15)
at upickle.GeneratedUtil$$anonfun$readerCaseFunction$1.applyOrElse(GeneratedUtil.scala:15)
at upickle.Reader$$anonfun$read$1.applyOrElse(Types.scala:42)
at upickle.Reader$$anonfun$read$1.applyOrElse(Types.scala:42)
at upickle.Reader$$anonfun$read$1.applyOrElse(Types.scala:42)
at upickle.Reader$$anonfun$read$1.applyOrElse(Types.scala:42)
at upickle.Types$class.readJs(Types.scala:139)
at upickle.package$.readJs(package.scala:10)
at upickle.Types$class.read(Types.scala:135)
at upickle.package$.read(package.scala:10)
As I understand, it's having problems with creating an instance of Map. Do you know any way to resolve this? Thanks!