mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Arrays of CustomJSONConvertible elements have a JSON property.
This commit is contained in:
parent
6688f223fe
commit
ef7ce734d7
@ -191,6 +191,12 @@ extension Int: CustomJSONConvertible {
|
||||
}
|
||||
}
|
||||
|
||||
extension Array where Element: CustomJSONConvertible {
|
||||
public var JSON: Doubt.JSON {
|
||||
return .Array(map(Doubt.JSON.init))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// A type which can be converted to and from JSON.
|
||||
public protocol JSONConvertible: CustomJSONConvertible {
|
||||
|
Loading…
Reference in New Issue
Block a user