Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Commit

Permalink
Merge pull request #215 from pbardea/swift3
Browse files Browse the repository at this point in the history
Remove unnecessary `NSString` cast
  • Loading branch information
mdmathias authored Sep 16, 2016
2 parents bd9fee9 + 12943fa commit 37e47b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/JSONParsing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension JSON {

/// Create `JSON` from UTF-8 `string`.
public init(jsonString: Swift.String, usingParser parser: JSONParserType.Type = JSONParser.self) throws {
self = try parser.createJSON(from: (jsonString as NSString).data(using: Swift.String.Encoding.utf8.rawValue) ?? Data())
self = try parser.createJSON(from: jsonString.data(using: Swift.String.Encoding.utf8) ?? Data())
}
}

Expand Down

0 comments on commit 37e47b5

Please sign in to comment.