JSONValue
-
Just enough JSON to carry ids, arguments and results through without knowing their shape.
Description#
An id is echoed back exactly as it arrived — a client that sends a string id and receives a number will not match them up.
Members20#
Common operations1#
Other members19#
- !=(_:_:) function inherited Returns a Boolean value indicating whether two values are not equal.
- bool(_:): case bool(Bool) constant
- integer(_:): case integer(Int64) constant
- unsignedInteger(_:): case unsignedInteger(UInt64) constant
- number(_:): case number(Double) constant
- string(_:): case string(String) constant
- array(_:): case array([JSONValue]) constant
- object(_:): case object([String : JSONValue]) constant
- init(from:) method Creates a new instance by decoding from the given decoder.
- encode(to:) method Encodes this value into the given encoder.
- stringValue: var string
Value : String? property - boolValue: var bool
Value : Bool? property - intValue: var int
Value : Int? property - doubleValue: var double
Value : Double? property - arrayValue: var array
Value : [JSONValue]? property - objectValue: var object
Value : [String : JSONValue]? property - isNull: var is
Null : Bool property - ==(_:_:) function Returns a Boolean value indicating whether two values are equal.
- hash(into:) method Hashes the essential components of this value by feeding them into the given hasher.