Bool
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait JsonValueclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Inherited methods
The array's elements, when this is an array.
The boolean, when this is one.
The value at name, when this is an object that has it.
The value at name, when this is an object that has it.
Total, like every accessor here: an absent key, a non-object receiver and an explicit null are all None. There is deliberately no throwing apply; a JSON document is remote input and this library has no accessor that can fail on it.
This takes the first field named name, which in a parsed document is also the only one: JsonValue.Obj explains why a document that names a field twice is rejected instead of being read.
Attributes
- Inherited from:
- JsonValue
Whether this is the JSON literal null.
Whether this is a number, of either case.
The object's field names in document order; empty when this is not an object.
The object's field names in document order; empty when this is not an object.
Attributes
- Inherited from:
- JsonValue
The JSON kind, for a failure message that says what was found rather than only what was wanted.
The JSON kind, for a failure message that says what was found rather than only what was wanted.
Attributes
- Inherited from:
- JsonValue
The number, when this is one, truncated toward zero.
The number, when this is one, truncated toward zero.
Truncation is what a wire int64 field wants and what the previous accessor did — numOpt.map(_.toLong) — so a fractional value still answers with its whole part rather than with None. Nothing is allocated for an JsonValue.Int64 beyond the Option itself.
Attributes
- Inherited from:
- JsonValue
The number, when this is one, as an exact decimal.
The number, when this is one, as an exact decimal.
This builds a BigDecimal for an JsonValue.Int64, which is the case almost every number a response carries lands in — so it undoes, at this one call, the saving the two cases exist for. Reach for longOpt instead whenever a Long is what the caller wanted anyway, which in this library it always is.
Attributes
- Inherited from:
- JsonValue
The object's fields in document order, when this is an object.
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product