[Lift] Re: serializing and deserializing a json object through Lift-JSON

2010-02-20 Thread Ali
his would've worked: > > case class X(yy: Option[Y]) > case class Y(ss: String) > > from(to(X(None))) > > It makes me a bit sad that both Scala and JSON support null values... > > Cheers Joni > > On Feb 20, 8:13 am, Ali wrote: > > > Thanks for your

[Lift] Re: serializing and deserializing a json object through Lift-JSON

2010-02-20 Thread Ali
ted. Note a recommended way is to use Option for optional > values. This would've worked: > > case class X(yy: Option[Y]) > case class Y(ss: String) > > from(to(X(None))) > > It makes me a bit sad that both Scala and JSON support null values... > > Cheers Joni >

[Lift] Re: serializing and deserializing a json object through Lift-JSON

2010-02-19 Thread Ali
X outside of class. > > Cheers Joni > > On Feb 20, 12:16 am, Ali wrote: > > > Hi, > >  I am wondering, could you please let me know what is wrong in the > > following code: > > > case class X(vv:String) > > val sample = new X("A") > > >

[Lift] Re: serializing and deserializing a json object through Lift-JSON

2010-02-19 Thread Ali
Hi, I am wondering, could you please let me know what is wrong in the following code: case class X(vv:String) val sample = new X("A") implicit val formats = net.liftweb.json.DefaultFormats import net.liftweb.json.JsonAST._ import net.liftweb.json.Extraction._ import net.l

[Lift] Re: serializing and deserializing a json object through Lift-JSON

2010-02-17 Thread Ali
Thank you :) -A On Feb 17, 1:23 pm, Joni Freeman wrote: > Hi Ali, > > I added a ticket for > this:http://www.assembla.com/spaces/liftweb/tickets/352-do-not-serialize-t...) > > Meanwhile, you can cleanup the serialized JSON for instance by using > 'remove' fu

[Lift] Re: serializing and deserializing a json object through Lift-JSON

2010-02-17 Thread Ali
ence comparison, Array(1, 2) == Array(1, 2) -> false): > > http://github.com/dpp/liftweb/blob/joni_issue_341/framework/lift-base... > > Cheers Joni > > On Feb 11, 12:09 pm, Ali wrote: > > > Thanks guys, Actually my problem is still there, It looks like > > l

[Lift] Re: serializing and deserializing a json object through Lift-JSON

2010-02-11 Thread Ali
s > defect:http://www.assembla.com/spaces/liftweb/tickets/341-Type-hints-are-nee... > > Cheers Joni > > On Feb 10, 7:49 pm, Justin Reardon wrote: > > > Sometimes the serialization code needs a helping hand, using: > > >         implicit val format = > > Ser

[Lift] serializing and deserializing a json object through Lift-JSON

2010-02-10 Thread Ali
Dear All, I am wondering would you please tell me how can I use lift-json (2.0 snapshots) to serialize and deserialize the following scala case classes. case class Plan( plan:Option[Action] ) case class Game( game:Map[String,Plan]) case class Action(id:Int, subAction : Option[Action]) val game