mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Serialization of JSON to NSData.
This commit is contained in:
parent
07279ca344
commit
e045a9063f
@ -83,6 +83,10 @@ public enum JSON: ArrayLiteralConvertible, BooleanLiteralConvertible, Dictionary
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> NSData {
|
||||
return try! NSJSONSerialization.dataWithJSONObject(object, options: .PrettyPrinted)
|
||||
}
|
||||
|
||||
|
||||
// MARK: ArrayLiteralConvertible
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user