NumInt
Members list
Type members
Types
Attributes
- Source:
- Json.scala
Value members
Concrete methods
The type of value
Convenience method for asNum.value
Attributes
- Definition Classes
- Source:
- Json.scala
Attributes
- Definition Classes
- Source:
- Json.scala
Attributes
- Definition Classes
- Source:
- Json.scala
Attributes
- Definition Classes
- Source:
- Json.scala
Attributes
- Definition Classes
- Source:
- Json.scala
Attributes
- Definition Classes
- Source:
- Json.scala
Attributes
- Definition Classes
- Source:
- Json.scala
Safely casts this Json as the specified JsonType. Throws an exception if not a match.
Safely casts this Json as the specified JsonType. Throws an exception if not a match.
Attributes
- V
the return type
- `type`
the type to cast this JsonType as
- Definition Classes
- Source:
- Json.scala
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
x
of typeAny
,x.equals(x)
should returntrue
. - It is symmetric: for any instances
x
andy
of typeAny
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any instances
x
,y
, andz
of typeAny
ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
.
If you override this method, you should verify that your implementation remains an equivalence relation.
Additionally, when overriding this method it is usually necessary to override hashCode
to ensure that
objects which are "equal" (o1.equals(o2)
returns true
) hash to the same scala.Int.
(o1.hashCode.equals(o2.hashCode)
).
Attributes
- that
the object to compare against this object for equality.
- Returns:
true
if the receiver object is equivalent to the argument;false
otherwise.- Definition Classes
- Equals -> Any
- Source:
- Json.scala
Attributes
- Definition Classes
- Source:
- Json.scala
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
- Source:
- Json.scala
Inherited methods
Looks up a Json based on Path
Looks up a Json based on Path
Example: val v = someValue("first" \ "second" \ "third")
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Looks up a Json by name in the children.
Looks up a Json by name in the children.
Throws an exception if invoked on anything except Obj
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Casts to Arr or throws an exception if not an Arr
Casts to Bool or throws an exception if not a Bool
Convenience method for asBool.value
Convenience method for asObj.value
Casts to Num or throws an exception if not a Num
Casts to NumDec or throws an exception if not a NumDec
Casts to NumDec or throws an exception if not a NumDec
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Casts to NumInt or throws an exception if not a NumInt
Casts to NumInt or throws an exception if not a NumInt
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Casts to Obj or throws an exception if not an Obj
Casts to Str or throws an exception if not a Str
Convenience method for asStr.value
Convenience method for asArr.value
Applies the filter recursively to this value beginning on the leafs working backward up the tree back to the root.
Applies the filter recursively to this value beginning on the leafs working backward up the tree back to the root.
Attributes
- filter
the filter to apply
- Returns:
Option[Json]
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Looks up a Json based on Path
Looks up a Json based on Path
Example: val o: Option[Json] = someValue("first" \ "second" \ "third")
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Looks up a Json by name in the children.
Casts to Arr if it's of Arr type or returns None
Safely casts this Json as the specified JsonType. Returns None if it's a different type.
Safely casts this Json as the specified JsonType. Returns None if it's a different type.
Attributes
- V
the value type
- `type`
the value type of value you want.
- Returns:
Option[V]
- Inherited from:
- Json
- Source:
- Json.scala
Convenience method for getNum.map(_.value)
Casts to Bool if it's of Bool type or returns None
Convenience method for getBool.map(_.value)
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Convenience method for getObj.map(_.value)
Casts to Num if it's of Num type or returns None
Casts to Obj if it's of Obj type or returns None
Looks up a Json by name in the children or creates a new Obj if it doesn't exist.
Looks up a Json by name in the children or creates a new Obj if it doesn't exist.
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Casts to Str if it's of Str type or returns None
Convenience method for getStr.map(_.value)
Convenience method for getArr.map(_.value)
True if this is an Arr
True if this is a Bool
True if this is a Null
True if this is a Num
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
True if this is an Obj
True if this is a Str
Merges a Json at the specified path
Merges a Json at the specified path
Attributes
- config
the merge configuration (defaults to MergeConfig)
- path
the path (defaults to Path.empty)
- value
the value to merge
- Returns:
root Json after merge
- Inherited from:
- Json
- Source:
- Json.scala
Modifies the value at the specified path and returns back a new root Json with the modified path.
Modifies the value at the specified path and returns back a new root Json with the modified path.
Note: We use the term "modify" here from an immutable standpoint. The original Json will not change.
Attributes
- f
the function that takes the current Json and returns the modified Json
- path
the path to modify
- Returns:
new root Json representing the changes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Convenience functionality for #modify to remove the value at a specific path.
Convenience functionality for #modify to remove the value at a specific path.
Attributes
- path
the path to remove
- Returns:
new root Json representing the changes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala
Convenience functionality for #modify to set a specific value at a path.
Convenience functionality for #modify to set a specific value at a path.
Attributes
- path
the path to replace
- value
the new value to set
- Returns:
new root Json representing the changes
- Inherited from:
- Json
- Source:
- Json.scala
Attributes
- Inherited from:
- Json
- Source:
- Json.scala