parsing - Generic scala json parser playframework 2 -


i'm using play2.1.1 in scala , i'm trying make writes[indexresults[t]] definition of indexresults[t] can find @ end of file.

my code:

import com.github.cleverage.elasticsearch.scalahelpers._ import com.github.cleverage.elasticsearch._ // used others stuffs  ...  val writeresults: writes[scalahelpers.indexresults[t]] = (   (__ \ "totalcount").write[long] ,   (__ \ "pagesize").write[long] ,   (__ \ "pagecurrent").write[long] ,   (__ \ "pagenb").write[long] ,   (__ \ "results").write[list[t]](writes) )(unlift(scalahelpers.indexresults[t].unapply)) 

my error:

overloaded method value write alternatives: [error]   (t: list[t])(implicit w: play.api.libs.json.writes[list[t]])play.api.libs.json.owrites[play.api.libs.json.jsvalue] <and> [error]   (implicit w: play.api.libs.json.writes[list[t]])play.api.libs.json.owrites[list[t]] [error]  cannot applied (play.api.libs.json.writes[t]) [error]     (__ \ "results").write[list[t]](writes)                                ^ 

i can't figure out why it's not working , error doesn't mean me. correct way have generic scala json writer , how should use it?

ps: official documentation didn't me much.

thank you


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -