JSONUtils

public struct JSONUtils

JSON utilities.

  • Converts the speficied string to a JSON object.

    Declaration

    Swift

    public static func convertStringToJSON(text: String?) -> [String : Any]?
  • Converts an array element contained in a JSON object to an array of Strings. The fieldName argument should state the name of the JSON property that contains the array.

    Declaration

    Swift

    public static func convertJSONArrayToStringArray(json: [String : Any], fieldName: String) -> [String]