JSONParserType

public protocol JSONParserType

Protocol describing a backend parser that can produce JSON from Data.

  • Creates an instance of JSON from Data. - parameter data: An instance of Data to use to create JSON. - throws: An error that may arise from calling JSONObjectWithData(_:options:) on NSJSONSerialization with the given data. - returns: An instance of JSON.

    Declaration

    Swift

    static func createJSON(from data: Data) throws -> JSON

    Parameters

    data

    An instance of Data to use to create JSON.

    Return Value

    An instance of JSON.