Data
public extension Data
Data extension for JSON deserialization.
-
Deserializes the JSON Data to the given type.
Declaration
Swift
func deserializeJSONData<T>( withKeyDecodingStrategy keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy? = nil) throws -> T where T: Decodable
Return Value
The deserilized object.
-
Creates a JSON string (pretty printed) from Data.
Declaration
Swift
func toJSONString() -> String?
Return Value
The pretty printed string.