ENUM
JSONValue
public enum JSONValue: Codable, Equatable
Cases
bool(_:)
case bool(Bool)
int(_:)
case int(Int)
double(_:)
case double(Double)
string(_:)
case string(String)
array(_:)
case array([JSONValue])
dictionary(_:)
case dictionary([String: JSONValue])
null
case null
Methods
==(_:_:)
public static func ==(lhs: JSONValue, rhs: JSONValue) -> Bool
Parameters
Name | Description |
---|---|
lhs | A value to compare. |
rhs | Another value to compare. |
valueForKeyPath(_:)
public func valueForKeyPath(_ keyPath: [String]) throws -> JSONValue
encode(to:)
public func encode(to encoder: Encoder) throws
Parameters
Name | Description |
---|---|
encoder | The encoder to write data to. |
init(from:)
public init(from decoder: Decoder) throws
Parameters
Name | Description |
---|---|
decoder | The decoder to read data from. |