1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

String is CustomJSONConvertible.

This commit is contained in:
Rob Rix 2015-10-14 14:20:13 -04:00
parent 29001b713c
commit f34af098d3

View File

@ -175,6 +175,13 @@ public protocol CustomJSONConvertible {
}
extension String: CustomJSONConvertible {
public var JSON: Doubt.JSON {
return .String(self)
}
}
/// A type which can be converted to and from JSON.
public protocol JSONConvertible: CustomJSONConvertible {
init?(JSON: Doubt.JSON)