JsonNumber

grapple.json.JsonNumber
See theJsonNumber companion object
sealed trait JsonNumber extends JsonValue

Represents JSON number.

Attributes

Companion
object
Graph
Supertypes
trait JsonValue
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def toBigDecimal: BigDecimal

Gets value as BigDecimal.

Gets value as BigDecimal.

Attributes

def toBigInt: BigInt

Gets value as BigInt.

Gets value as BigInt.

Attributes

Throws
java.lang.ArithmeticException

if not represented exactly

def toDouble: Double

Gets value as Double.

Gets value as Double.

Attributes

def toFloat: Float

Gets value as Float.

Gets value as Float.

Attributes

def toInt: Int

Gets value as Int.

Gets value as Int.

Attributes

Throws
java.lang.ArithmeticException

if not represented exactly

def toLong: Long

Gets value as Long.

Gets value as Long.

Attributes

Throws
java.lang.ArithmeticException

if not represented exactly

Inherited methods

final def as[T](using input: JsonInput[T]): T

Converts value.

Converts value.

Value parameters

input

converter

Attributes

Inherited from:
JsonValue