json.value

package json.value

Type members

Classlikes

object FALSE extends JsBool
final case class Index(i: Int) extends Position

represents an index in a Json array

represents an index in a Json array

Value parameters:
i

the number of the index

final case class JsArray(seq: Seq[JsValue]) extends IterableOnce[JsValue] with Json[JsArray]

represents an immutable Json array. There are several ways of creating a Json array, being the most common the following:

represents an immutable Json array. There are several ways of creating a Json array, being the most common the following:

  • From a string, array of bytes or an input stream of bytes, using the parse functions of the companion object
  • From the apply function of the companion object:
Value parameters:
seq

immutable seq of JsValue

Companion:
object
object JsArray
Companion:
class
final case class JsBigDec(value: BigDecimal) extends JsNumber

Represents an immutable number of type BigDecimal

Represents an immutable number of type BigDecimal

Value parameters:
value

the value of the number

final case class JsBigInt(value: BigInt) extends JsNumber

Represents an immutable number of type BigInt

Represents an immutable number of type BigInt

Value parameters:
value

the value of the number

Companion:
object
object JsBigInt
Companion:
class
sealed case class JsBool(value: Boolean) extends JsPrimitive

represents an immutable boolean

represents an immutable boolean

Value parameters:
value

the value associated, either true or false

Companion:
object
object JsBool
Companion:
class
final case class JsDouble(value: Double) extends JsNumber

Represents an immutable number of type Double

Represents an immutable number of type Double

Value parameters:
value

the value of the number

Companion:
object
object JsDouble
Companion:
class
final case class JsInt(value: Int) extends JsNumber

Represents an immutable number of type Int

Represents an immutable number of type Int

Value parameters:
value

the value of the number

Companion:
object
object JsInt
Companion:
class
final case class JsLong(value: Long) extends JsNumber

Represents an immutable number of type Long

Represents an immutable number of type Long

Value parameters:
value

the value of the number

Companion:
object
object JsLong
Companion:
class
case object JsNothing extends JsValue

It's a special Json value that represents 'nothing'. Inserting nothing in a json leaves the json unchanged. Functions that return a JsValue, return JsNothing when no element is found, what makes them total on their arguments.

It's a special Json value that represents 'nothing'. Inserting nothing in a json leaves the json unchanged. Functions that return a JsValue, return JsNothing when no element is found, what makes them total on their arguments.

val obj = JsObj.empty obj("a") == JsNothing obj.inserted("a",JsNothing) == obj

case object JsNull extends JsPrimitive

Json null singleton object

Json null singleton object

sealed trait JsNumber extends JsPrimitive

Represents an immutable number

Represents an immutable number

final case class JsObj(bindings: Map[String, JsValue]) extends IterableOnce[(String, JsValue)] with Json[JsObj]

represents an immutable Json object. There are several ways of creating a Json object, being the most common the following:

represents an immutable Json object. There are several ways of creating a Json object, being the most common the following:

  • From a string, array of bytes or an input stream of bytes, using the parse functions of the companion object
  • From the apply function of the companion object.
Value parameters:
bindings

immutable map of JsValue

Companion:
object
object JsObj
Companion:
class
final case class JsPath(positions: Vector[Position])

Represents the full path location of an element in a json. The easiest way of creating a JsPath is.

Represents the full path location of an element in a json. The easiest way of creating a JsPath is.

Value parameters:
positions

keys and/or indexes a path is made up of

Companion:
object
object JsPath
Companion:
class
sealed trait JsPrimitive extends JsValue

Represents any value in a Json that is not a container, i.e. a Json object or a Json array

Represents any value in a Json that is not a container, i.e. a Json object or a Json array

final case class JsStr(value: String) extends JsPrimitive

Represents an immutable string

Represents an immutable string

Value parameters:
value

the value of the string

Companion:
object
object JsStr
Companion:
class
sealed trait JsValue

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

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

sealed trait Json[T <: Json[T]] extends JsValue
Companion:
object
object Json
Companion:
class
case class Key(name: String) extends Position

represents a key in a Json object

represents a key in a Json object

Value parameters:
name

name of the key

sealed trait Position

represents a position in a Json. A JsPath is a list of positions.

represents a position in a Json. A JsPath is a list of positions.

object TRUE extends JsBool
object UserError