mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +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