JSONConfigurationProvider

open class JSONConfigurationProvider : ConfigurationProviding

Built-in configuration provider that obtains data supplied via application defined user interaction.

  • Default class initializer.

    Declaration

    Swift

    public init()
  • A read-only property. The value for this class is com.sap.configuration.provider.json.

    Declaration

    Swift

    public var providerIdentifier: String { get }
  • Reports what input(s) are required for operation. The value for this class is a Dictionary containing the key ConfigurationProviderInputKeys.JSONstring and a value for the key. For example, a Dictionary structured as so:

     var example: [String: Any] = [ConfigurationProviderInputKeys.JSONstring.rawValue : "{"name":"sap.com","messages":["msg 1","msg 2","msg 3"],"age":100}"]
    

    Declaration

    Swift

    public var expectedInput: [String : Any] { get }
  • Declaration

    Swift

    public func provideConfiguration(input: [String: Any] = [:]) -> (providerSuccess: Bool, configuration: NSDictionary, returnError: Error?)

    Parameters

    input

    Data supplied by app in response to expectedInput dictionary.

    Return Value

    A tuple consisting of providerSuccess (success/fail result), configuration if available, and returnError if applicable.