JSONParserType
public protocol JSONParserType
Protocol describing a backend parser that can produce JSON
from Data
.
-
Creates an instance of
JSON
fromData
. - parameter data: An instance ofData
to use to createJSON
. - throws: An error that may arise from callingJSONObjectWithData(_:options:)
onNSJSONSerialization
with the given data. - returns: An instance ofJSON
.Declaration
Swift
static func createJSON(from data: Data) throws -> JSON
Parameters
data
An instance of
Data
to use to createJSON
.Return Value
An instance of
JSON
.