Is X perhaps an inner class? Inner class has an implicit reference to outer instance. Serializing those is not supported.
If so, please move definition of X outside of class. Cheers Joni On Feb 20, 12:16 am, Ali <[email protected]> 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") > > implicit val formats = net.liftweb.json.DefaultFormats > import net.liftweb.json.JsonAST._ > import net.liftweb.json.Extraction._ > import net.liftweb.json.Printer._ > > def from(in:String):X=net.liftweb.json.Serialization.read[X](in) > def to(in:X):String=compact(render(decompose(in))) > > val sample2=from(to(sample)) > sample2 must_== sample > > I am getting java.util.NoSuchElementException: key not found: $outer > > Thanks, > -A -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
