Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better comments

  • Loading branch information...
commit 7ed4b6fe255337fdbed001d578a702c7b4d8ab7f 1 parent 30affd1
Pascal Voitot authored
Showing with 16 additions and 3 deletions.
  1. +16 −3 framework/src/play/src/main/scala/play/api/libs/json/Json.scala
View
19 framework/src/play/src/main/scala/play/api/libs/json/Json.scala
@@ -36,9 +36,22 @@ object Json {
def fromJson[T](json: JsValue)(implicit fjs: Reads[T]): T = fjs.reads(json)
/*
- * Rich Json syntax allows :
- * JsObject(Seq("key", JsString("value")) ====> Json.obj( "key1" -> "value", "key2" -> 123, "key3" -> obj("key31" -> "value31"))
- * JsArray(JsString("value"), JsNumber(123), JsBoolean(true)) ====> Json.arr( "value", 123, true )
+ * Next is the trait that allows Simplified Json syntax :
+ *
+ * Example :
+ * JsObject(Seq(
+ * "key1", JsString("value"),
+ * "key2" -> JsNumber(123),
+ * "key3" -> JsObject(Seq("key31" -> JsString("value31")))
+ * ))
+ * ====> Json.obj( "key1" -> "value", "key2" -> 123, "key3" -> obj("key31" -> "value31"))
+ *
+ * JsArray(JsString("value"), JsNumber(123), JsBoolean(true))
+ * ====> Json.arr( "value", 123, true )
+ *
+ * There is an implicit conversion from any Type to JsValueWrapper which is an empty trait that
+ * shouldn't end into unexpected implicit conversions
+ *
*/
trait JsValueWrapper
Please sign in to comment.
Something went wrong with that request. Please try again.