Value

ujson.Value
See theValue companion object
sealed trait Value extends Readable, Writable

Attributes

Companion
object
Graph
Supertypes
trait Writable
trait Readable
class Object
trait Matchable
class Any
Known subtypes
class Arr
class Bool
object False.type
object True.type
object Null.type
class Num
class Obj
class Str
Show all

Members list

Value members

Abstract methods

def value: Any

Concrete methods

def apply(s: Selector): Value
def arr: ArrayBuffer[Value]

Returns the elements of this Value, fails if it is not a ujson.Arr

Returns the elements of this Value, fails if it is not a ujson.Arr

Attributes

def arrOpt: Option[ArrayBuffer[Value]]

Returns The optional elements of this Value in case this Value is a 'Arr'.

Returns The optional elements of this Value in case this Value is a 'Arr'.

Attributes

def bool: Boolean

Returns the Boolean value of this Value, fails if it is not a ujson.Bool

Returns the Boolean value of this Value, fails if it is not a ujson.Bool

Attributes

def boolOpt: Option[Boolean]

Returns an Optional Boolean value of this Value in case this Value is a 'Bool'.

Returns an Optional Boolean value of this Value in case this Value is a 'Bool'.

Attributes

override def httpContentType: Option[String]

Attributes

Definition Classes
Writable
def isNull: Boolean

Returns true if the value of this Value is ujson.Null, false otherwise

Returns true if the value of this Value is ujson.Null, false otherwise

Attributes

def num: Double

Returns the Double value of this Value, fails if it is not a ujson.Num

Returns the Double value of this Value, fails if it is not a ujson.Num

Attributes

def numOpt: Option[Double]

Returns an Option[Double] in case this Value is a 'Num'.

Returns an Option[Double] in case this Value is a 'Num'.

Attributes

def obj: LinkedHashMap[String, Value]

Returns the key/value map of this Value, fails if it is not a ujson.Obj

Returns the key/value map of this Value, fails if it is not a ujson.Obj

Attributes

def objOpt: Option[LinkedHashMap[String, Value]]

Returns an Optional key/value map of this Value in case this Value is a 'Obj'.

Returns an Optional key/value map of this Value in case this Value is a 'Obj'.

Attributes

def render(indent: Int, escapeUnicode: Boolean): String
def str: String

Returns the String value of this Value, fails if it is not a ujson.Str

Returns the String value of this Value, fails if it is not a ujson.Str

Attributes

def strOpt: Option[String]

Returns an Optional String value of this Value in case this Value is a 'String'.

Returns an Optional String value of this Value in case this Value is a 'String'.

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def transform[T](f: Visitor[_, T]): T
def update(s: Selector, v: Value): Unit
def update(s: Selector, f: Value => Value): Unit

Update a value in-place. Takes an Int or a String, through the implicitly-constructe Value.Selector type.

Update a value in-place. Takes an Int or a String, through the implicitly-constructe Value.Selector type.

We cannot just overload update on s: Int and s: String because of type inference problems in Scala 2.11.

Attributes

def writeBytesTo(out: OutputStream, indent: Int, escapeUnicode: Boolean): Unit
def writeBytesTo(out: OutputStream): Unit

Inherited methods

def contentLength: Option[Long]

Attributes

Inherited from:
Writable