t

play.api.libs.json.Json

JsValueWrapper

sealed trait JsValueWrapper extends AnyRef

Next is the trait that allows Simplified Json syntax :

Example:

import play.api.libs.json._

JsObject(Seq(
   "key1" -> JsString("value"),
   "key2" -> JsNumber(123),
   "key3" -> JsObject(Seq("key31" -> JsString("value31")))
)) == Json.obj(
  "key1" -> "value", "key2" -> 123, "key3" -> Json.obj("key31" -> "value31"))

JsArray(Seq(JsString("value"), JsNumber(123), JsBoolean(true))) == Json.arr("value", 123, true)

There is an implicit conversion from any Type with a Json Writes to JsValueWrapper which is an empty trait that shouldn't end into unexpected implicit conversions.

Source
Json.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsValueWrapper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected