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:
parent
29001b713c
commit
f34af098d3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user