JSONValue
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public enum JSONValue : Sendable
extension JSONValue: Decodable
extension JSONValue: Encodable
extension JSONValue: Equatable
Represents a value in one of JSON’s data types.
This may be decoded from, or encoded to, a
google.protobuf.Value
.
-
A
null
value.Declaration
Swift
case null
-
A numeric value.
Declaration
Swift
case number(Double)
-
A string value.
Declaration
Swift
case string(String)
-
A boolean value.
Declaration
Swift
case bool(Bool)
-
A JSON object.
Declaration
Swift
case object(JSONObject)
-
An array of
JSONValue
s.Declaration
Swift
case array([JSONValue])
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws