JsonNumber

sealed abstract class JsonNumber extends Serializable

A JSON number with optimization by cases.

Companion:
object
Source:
JsonNumber.scala
trait Serializable
class Object
trait Matchable
class Any

Value members

Abstract methods

Return this number as a scala.math.BigDecimal.

Return this number as a scala.math.BigDecimal.

Source:
JsonNumber.scala

Return this number as a scala.math.BigInt if it's a sufficiently small whole number.

Return this number as a scala.math.BigInt if it's a sufficiently small whole number.

Source:
JsonNumber.scala

Convert this number to its best scala.Double approximation.

Convert this number to its best scala.Double approximation.

Anything over Double.MaxValue will be rounded to Double.PositiveInfinity and anything below Double.MinValue is rounded to Double.NegativeInfinity.

Source:
JsonNumber.scala

Convert this number to its best scala.Float approximation.

Convert this number to its best scala.Float approximation.

Anything over Float.MaxValue will be rounded to Float.PositiveInfinity and anything below Float.MinValue is rounded to Float.NegativeInfinity.

Source:
JsonNumber.scala

Return this number as a scala.Long if it's a valid scala.Long.

Return this number as a scala.Long if it's a valid scala.Long.

Source:
JsonNumber.scala

Concrete methods

final override def equals(that: Any): Boolean

Universal equality derived from our type-safe equality.

Universal equality derived from our type-safe equality.

Definition Classes
Any
Source:
JsonNumber.scala
final override def hashCode: Int

Hashing that is consistent with our universal equality.

Hashing that is consistent with our universal equality.

Definition Classes
Any
Source:
JsonNumber.scala
final def toByte: Option[Byte]

Return this number as a scala.Byte if it's a valid scala.Byte.

Return this number as a scala.Byte if it's a valid scala.Byte.

Source:
JsonNumber.scala
final def toInt: Option[Int]

Return this number as an scala.Int if it's a valid scala.Int.

Return this number as an scala.Int if it's a valid scala.Int.

Source:
JsonNumber.scala
final def toShort: Option[Short]

Return this number as a scala.Short if it's a valid scala.Short.

Return this number as a scala.Short if it's a valid scala.Short.

Source:
JsonNumber.scala