t

value

JsValue

sealed trait JsValue extends AnyRef

Represents any element in a Json. All the value types are immutable, being the Json array and Json object implemented with persistent data structures

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsValue
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def id: Int

    Every implementation of this trait has an unique identifier.

    Every implementation of this trait has an unique identifier.

    returns

    unique identifier of the type

  2. abstract def isArr: Boolean

    returns true if this is an array

  3. abstract def isBigDec: Boolean

    returns true if this is a big decimal.

    returns true if this is a big decimal.

    returns

    true if this is a big decimal and false otherwise. If this is a double, it returns false.

  4. abstract def isBigInt: Boolean

    returns true if this is a big integer.

    returns true if this is a big integer.

    returns

    true if this is a big integer and false otherwise. If this is either an integer or a long, it returns false.

  5. abstract def isBool: Boolean

    returns true if this is a boolean

  6. abstract def isDouble: Boolean

    returns true if this is a double

  7. abstract def isInt: Boolean

    returns true if this is an integer (32 bit precision number)

  8. abstract def isLong: Boolean

    returns true if this is a long (62 bit precision number)

    returns true if this is a long (62 bit precision number)

    returns

    true if this is a long and false otherwise. If this is an integer, it returns false.

  9. abstract def isNothing: Boolean

    returns true if this is JsNothing

    returns true if this is JsNothing

    returns

    true if this is JsNothing, false otherwise

  10. abstract def isNull: Boolean

    returns true if this is JsNull

    returns true if this is JsNull

    returns

    true if this is JsNull, false otherwise

  11. abstract def isNumber: Boolean

    returns true if this is a number

  12. abstract def isObj: Boolean

    returns true if this is an object

  13. abstract def isStr: Boolean

    returns true if this is a string

  14. abstract def toJsArray: JsArray

    returns this value as a JsArray if it's an array, throwing an UserError otherwise.

    returns this value as a JsArray if it's an array, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isArr

    can help to that purpose.

    isArr }}}

    returns

    this value as a JsArray

    Annotations
    @throws(classOf[value.UserError])
  15. abstract def toJsBigDec: JsBigDec

    returns this value as a JsBigDec if it's a decimal number, throwing an UserError otherwise.

    returns this value as a JsBigDec if it's a decimal number, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isDecimal

    can help to that purpose.

    isDecimal }}}

    returns

    this value as a JsBigDec

    Annotations
    @throws(classOf[value.UserError])
  16. abstract def toJsBigInt: JsBigInt

    returns this value as a JsBigInt if it's an integral number, throwing an UserError otherwise.

    returns this value as a JsBigInt if it's an integral number, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isIntegral

    can help to that purpose.

    isIntegral }}}

    returns

    this value as a JsBigInt

    Annotations
    @throws(classOf[value.UserError])
  17. abstract def toJsBool: JsBool

    returns this value as a JsBool if it's a boolean, throwing an UserError otherwise.

    returns this value as a JsBool if it's a boolean, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isBool

    can help to that purpose.

    isBool }}}

    returns

    this value as a JsBool

    Annotations
    @throws(classOf[value.UserError])
  18. abstract def toJsDouble: JsDouble

    returns this value as a JsDouble if it is a JsLong or a JsInt or a JsDouble, throwing an UserError otherwise.

    returns this value as a JsDouble if it is a JsLong or a JsInt or a JsDouble, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isInt || isLong || isDouble

    can help to that purpose.

    isInt || isLong || isDouble }}}

    returns

    this value as a JsDouble

    Annotations
    @throws(classOf[value.UserError])
  19. abstract def toJsInt: JsInt

    returns this value as a JsInt, throwing an UserError otherwise.

    returns this value as a JsInt, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isInt

    can help to that purpose.

    isInt }}}

    returns

    this value as a JsInt

    Annotations
    @throws(classOf[value.UserError])
  20. abstract def toJsLong: JsLong

    returns this value as a JsLong if it is a JsLong or a JsInt, throwing an UserError otherwise.

    returns this value as a JsLong if it is a JsLong or a JsInt, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isInt || isLong

    can help to that purpose.

    isInt || isLong }}}

    returns

    this value as a JsLong

    Annotations
    @throws(classOf[value.UserError])
  21. abstract def toJsNull: JsNull.type

    returns this value as a JsNull if it's null, throwing an UserError otherwise.

    returns this value as a JsNull if it's null, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isNull

    can help to that purpose.

    isNull }}}

    returns

    this value as a JsNull

    Annotations
    @throws(classOf[value.UserError])
  22. abstract def toJsNumber: JsNumber

    returns this value as a JsNumber if it's a number, throwing an UserError otherwise.

    returns this value as a JsNumber if it's a number, throwing an UserError otherwise. It's the responsibility of the caller to make sure the invocation to this function doesn't fail. The guard condition

    isNumber

    can help to that purpose.

    isNumber }}}

    returns

    this value as a JsNumber

    Annotations
    @throws(classOf[value.UserError])
  23. abstract def toJsObj: JsObj

    returns this value as a JsObj if it's an object, throwing an UserError otherwise.

    returns this value as a JsObj if it's an object, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isObj

    can help to that purpose.

    isObj }}}

    returns

    this value as a JsObj

    Annotations
    @throws(classOf[value.UserError])
  24. abstract def toJsStr: JsStr

    returns this value as a JsStr if it's a string, throwing an UserError otherwise.

    returns this value as a JsStr if it's a string, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isStr

    can help to that purpose.

    isStr }}}

    returns

    this value as a JsStr

    Annotations
    @throws(classOf[value.UserError])
  25. abstract def toJson: Json[_]

    returns this value as a Json if it's an object or an array, throwing an UserError otherwise.

    returns this value as a Json if it's an object or an array, throwing an UserError otherwise. It's the responsibility of the caller to make sure the call to this function doesn't fail. The guard condition

    isJson

    can help to that purpose.

    isJson }}}

    returns

    this value as a Json

    Annotations
    @throws(classOf[value.UserError])

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def isArr(predicate: (JsArray) => Boolean): Boolean

    returns true if this is an array that satisfies a predicate

    returns true if this is an array that satisfies a predicate

    predicate

    the predicate

  12. def isDecimal(predicate: (BigDecimal) => Boolean): Boolean

    returns true if this is a big decimal that satisfies a predicate

    returns true if this is a big decimal that satisfies a predicate

    predicate

    the predicate

    returns

    true if this is a big decimal that satisfies the predicate. If this is a double, it returns false

  13. def isDecimal: Boolean

    returns true if this type is a decimal number

    returns true if this type is a decimal number

    returns

    isDouble || isBigDec
  14. def isDouble(predicate: (Double) => Boolean): Boolean

    returns true if this is a double that satisfies a predicate

    returns true if this is a double that satisfies a predicate

    predicate

    the predicate

    returns

    true if this is a double that satisfies the predicate

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def isInt(predicate: (Int) => Boolean): Boolean

    returns true if this is an integer that satisfies a predicate

    returns true if this is an integer that satisfies a predicate

    predicate

    the predicate

  17. def isIntegral(predicate: (BigInt) => Boolean): Boolean

    returns true if this is a big integer that satisfies a predicate

    returns true if this is a big integer that satisfies a predicate

    predicate

    the predicate

    returns

    true if this is a big integer that satisfies the predicate. If this is either an integer or a long, it returns false.

  18. def isIntegral: Boolean

    returns true if this type is an integral number

    returns true if this type is an integral number

    returns

    isInt || isLong || isBigInt
  19. def isJson(predicate: (Json[_]) => Boolean): Boolean

    returns true if this is a json that satisfy a predicate

    returns true if this is a json that satisfy a predicate

    predicate

    the predicate

  20. def isJson: Boolean

    returns true is this type is an array or an object

  21. def isLong(predicate: (Long) => Boolean): Boolean

    returns true if this is a long that satisfies a predicate

    returns true if this is a long that satisfies a predicate

    predicate

    the predicate

    returns

    true if this is a long that satisfies the predicate and false otherwise. If this is an integer, it returns false.

  22. def isNotJson: Boolean

    returns true if this is neither an object nor an array

  23. def isNotNull: Boolean

    returns true if this is not null

    returns true if this is not null

    returns

    true if this is not null, false otherwise

  24. def isNotNumber: Boolean

    returns true if this is not a number

  25. def isObj(predicate: (JsObj) => Boolean): Boolean

    returns true if this is an object that satisfies a predicate

    returns true if this is an object that satisfies a predicate

    predicate

    the predicate

  26. def isStr(predicate: (String) => Boolean): Boolean

    returns true if this is a string that satisfies a predicate

    returns true if this is a string that satisfies a predicate

    predicate

    the predicate

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped