value
package value
- Alphabetic
- By Inheritance
- value
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
Index(i: Int) extends Position with Product with Serializable
represents an index in a Json array
represents an index in a Json array
- i
the number of the index
-
final
case class
JsArray(values: Seq[JsValue] = Vector.empty) extends AbstractJsArray with Json[JsArray] with Traversable[JsValue] with Iterable[JsValue] with Product with Serializable
represents an immutable Json array.
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:
- values
immutable seq of JsValue
- case class JsArrayParser(deserializer: ValueParser) extends Parser[JsArray] with Product with Serializable
-
final
case class
JsBigDec(value: BigDecimal) extends JsNumber with Product with Serializable
Represents an immutable number of type
BigDecimal
Represents an immutable number of type
BigDecimal
- value
the value of the number
-
final
case class
JsBigInt(value: BigInt) extends JsNumber with Product with Serializable
Represents an immutable number of type
BigInt
Represents an immutable number of type
BigInt
- value
the value of the number
-
sealed
case class
JsBool(value: Boolean) extends JsPrimitive with Product with Serializable
represents an immutable boolean
represents an immutable boolean
- value
the value associated, either true or false
-
final
case class
JsDouble(value: Double) extends JsNumber with Product with Serializable
Represents an immutable number of type
Double
Represents an immutable number of type
Double
- value
the value of the number
-
final
case class
JsInt(value: Int) extends JsNumber with Product with Serializable
Represents an immutable number of type
Int
Represents an immutable number of type
Int
- value
the value of the number
-
final
case class
JsLong(value: Long) extends JsNumber with Product with Serializable
Represents an immutable number of type
Long
Represents an immutable number of type
Long
- value
the value of the number
-
sealed
trait
JsNumber extends JsPrimitive
Represents an immutable number
-
final
case class
JsObj(bindings: Map[String, JsValue] = HashMap.empty) extends AbstractJsObj with Traversable[(String, JsValue)] with Json[JsObj] with Product with Serializable
represents an immutable Json object.
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.
- bindings
immutable map of JsValue
-
case class
JsObjParser(spec: JsObjSpec, additionalKeys: Boolean = false) extends Parser[JsObj] with Product with Serializable
Represents a Json object parser.
Represents a Json object parser. The parsed Json object must conform the specification
- spec
specification of the Json object
- additionalKeys
if true, the parser accepts other keys different than the specified in the spec
-
final
case class
JsPath(positions: Vector[Position]) extends Product with Serializable
Represents the full path location of an element in a json.
Represents the full path location of an element in a json. The easiest way of creating a JsPath is.
- positions
keys and/or indexes a path is made up of
-
sealed
trait
JsPrimitive extends JsValue
Represents any value in a Json that is not a container, i.e.
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 with Product with Serializable
Represents an immutable string
Represents an immutable string
- value
the value of the string
-
sealed
trait
JsValue extends AnyRef
Represents any element in a Json.
Represents any element in a Json. All the value types are immutable, being the Json array and Json object implemented with persistent data structures
- sealed trait Json[T <: Json[T]] extends JsValue
-
case class
Key(name: String) extends Position with Product with Serializable
represents a key in a Json object
represents a key in a Json object
- name
name of the key
-
sealed
trait
Parser[T <: Json[T]] extends AnyRef
A parser parses an input into a Json
A parser parses an input into a Json
- T
the type of the Json returned
-
sealed
trait
Position extends AnyRef
represents a position in a Json.
represents a position in a Json. A JsPath is a list of positions.
Value Members
- object AbstractJson
- object FALSE extends JsBool
- object JsArray extends Serializable
- object JsArrayParser extends Serializable
-
object
JsNothing extends JsValue with Product with Serializable
It's a special Json value that represents 'nothing'.
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
-
object
JsNull extends JsPrimitive with Product with Serializable
Json null singleton object
- object JsNumber
- object JsObj extends Serializable
- object JsObjParser extends Serializable
- object JsPath extends Serializable
-
object
Preamble
singleton with all the implicit conversions of the library.
singleton with all the implicit conversions of the library. It must be always imported in order to be more concise and idiomatic defining Jsons, specs and JsPath.
- object TRUE extends JsBool