implicit final class ApsoJsonJsValue extends AnyVal
Implicit class that provides new methods for JsValues.
- Alphabetic
- By Inheritance
- ApsoJsonJsValue
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ApsoJsonJsValue(json: JsValue)
- json
the
JsValueto which the new methods are provided.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val json: JsValue
-
def
merge(other: JsValue, failOnConflict: Boolean = true): JsValue
Merges two JsValues if they are JsArrays or JsObjects.
Merges two JsValues if they are JsArrays or JsObjects. If they are JsObjects, a deep merge is performed.
When merging JsObjects, if
failOnConflictis false and conflicts exists between terminal values, these are resolved by using the values of the second JSON. IffailOnConflictis true, anIllegalArgumentExceptionis thrown.- other
the other JSON value to merge
- failOnConflict
whether to fail or resolve conflicts by using the values on the
otherJSON.- returns
the resulting merged JsObject
-
def
toString(): String
- Definition Classes
- Any
-
def
toValue: Any
Unwraps a JSON value.
Unwraps a JSON value. If the given value is a JSON string, number or boolean, a
String,BigDecimalorBooleanis returned respectively. If the given value is a JSON array or object, aList[Any]orMap[String, Any]is returned respectively, where each of the values is recursively unwrapped. If the given value is a JSON null,nullis returned.- returns
the unwrapped JSON value.