JSONNullable
public class JSONNullable<T: JSONDeserializer>: JSONDeserializer
Deserializer type for Optional<T>, where T: JSONDeserializer.
Use this deserializer when the JSON value is either null, or a valid T.Deserialized.
See
JSONOptional, for values that might not be present in the JSON.
-
Outputs
nilorT‘s output type.Declaration
Swift
public typealias Deserialized = T.Deserialized? -
Returns
nilwhen the JSON value isnull, otherwise returns the result ofT.deserialize.Throws
LetsT.deserializeerrors go through.Declaration
Swift
public static func deserialize(jsonObject: JSONParsedObject) throws -> Deserialized
View on GitHub
Install in Dash
JSONNullable Class Reference