JSONHelper
@objcMembers public final class JSONHelper: NSObject
Handles the translation from JSON strings to Swift Dictionary
and Array
.
-
Convenience method for retrieving a JSON object from a String.
Declaration
Swift
public static func makeJSONObject(string: String) throws -> Any
Return Value
Either a Dictionary
or Array -
Convenience method for retrieving a JSON dictionary from a String.
Declaration
Swift
public static func makeJSONDictionary(string: String) throws -> Dictionary<String, Any>
Return Value
The JSON dictionary
-
Convenience method for retrieving a JSON array from a String.
Declaration
Swift
public static func makeJSONArray(string: String) throws -> [Any]
Return Value
The JSON array