Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

json now compiles

  • Loading branch information...
commit 91dff5c35527cc7d80e0cc33bd126018154d5031 1 parent 9bb9279
Joni Freeman authored nafg committed
View
2  core/json/src/main/scala/net/liftweb/json/Extraction.scala
@@ -80,7 +80,7 @@ object Extraction {
case x: JValue => x
case x if primitive_?(x.getClass) => primitive2jvalue(x)(formats)
case x: Map[_, _] => JObject((x map { case (k: String, v) => JField(k, decompose(v)) }).toList)
- case x: Collection[_] => JArray(x.toList map decompose)
+ case x: Iterable[_] => JArray(x.toList map decompose)
case x if (x.getClass.isArray) => JArray(x.asInstanceOf[Array[_]].toList map decompose)
case x: Option[_] => x.flatMap[JValue] { y => Some(decompose(y)) }.getOrElse(JNothing)
case x =>
View
2  core/json/src/main/scala/net/liftweb/json/Formats.scala
@@ -167,7 +167,7 @@ trait TypeHints {
*/
def hintFor(clazz: Class[_]): String = components.filter(_.containsHint_?(clazz))
.map(th => (th.hintFor(clazz), th.classFor(th.hintFor(clazz)).getOrElse(sys.error("hintFor/classFor not invertible for " + th))))
- .sort((x, y) => (delta(x._2, clazz) - delta(y._2, clazz)) < 0).head._1
+ .sortWith((x, y) => (delta(x._2, clazz) - delta(y._2, clazz)) < 0).head._1
def classFor(hint: String): Option[Class[_]] = {
def hasClass(h: TypeHints) =
Please sign in to comment.
Something went wrong with that request. Please try again.