Skip to content

Commit

Permalink
Update various lift-webkit usages of lift-json rendering to new format.
Browse files Browse the repository at this point in the history
  • Loading branch information
farmdawgnation committed Jul 25, 2015
1 parent 09c5d58 commit 041f66a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/webkit/src/main/scala/net/liftweb/http/LiftSession.scala
Expand Up @@ -2133,7 +2133,7 @@ class LiftSession(private[http] val _contextPath: String, val underlyingId: Stri
case jsCmd: JsCmd => partialUpdate(JsCmds.JsSchedule(JsCmds.JsTry(jsCmd, false)))
case jsExp: JsExp => partialUpdate(JsCmds.JsSchedule(JsCmds.JsTry(jsExp.cmd, false)))
case jv: JsonAST.JValue => {
val s: String = json.pretty(json.render(jv))
val s: String = json.prettyRender(jv)
partialUpdate(JsCmds.JsSchedule(JsCmds.JsTry(JsRaw(toCall+"("+s+")").cmd, false)))
}
case x: AnyRef => {
Expand Down Expand Up @@ -2593,7 +2593,7 @@ class LiftSession(private[http] val _contextPath: String, val underlyingId: Stri
case jsExp: JsExp => partialUpdate(JsCmds.JsSchedule(JsCmds.JsTry(jsExp.cmd, false)))

case ItemMsg(guid, value) =>
partialUpdate(JsCmds.JsSchedule(JsRaw(s"lift.sendEvent(${guid.encJs}, {'success': ${Printer.compact(JsonAST.render(value))}} )").cmd))
partialUpdate(JsCmds.JsSchedule(JsRaw(s"lift.sendEvent(${guid.encJs}, {'success': ${compactRender(value)}} )").cmd))
case DoneMsg(guid) =>
partialUpdate(JsCmds.JsSchedule(JsRaw(s"lift.sendEvent(${guid.encJs}, {'done': true} )").cmd))

Expand Down
Expand Up @@ -138,7 +138,7 @@ object JsExp {
import json._

implicit def jValueToJsExp(jv: JValue): JsExp = new JsExp {
lazy val toJsCmd = Printer.compact(JsonAST.render(jv))
lazy val toJsCmd = compactRender(jv)
}

implicit def strToJsExp(str: String): JE.Str = JE.Str(str)
Expand Down

0 comments on commit 041f66a

Please sign in to comment.