mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Ranges have a JSON property.
This commit is contained in:
parent
ae6ecef9c2
commit
ba33e1c4a3
@ -197,6 +197,15 @@ extension Array where Element: CustomJSONConvertible {
|
||||
}
|
||||
}
|
||||
|
||||
extension Range where Element: CustomJSONConvertible, Element.Distance: CustomJSONConvertible {
|
||||
public var JSON: Doubt.JSON {
|
||||
return [
|
||||
startIndex.JSON,
|
||||
count.JSON,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// A type which can be converted to and from JSON.
|
||||
public protocol JSONConvertible: CustomJSONConvertible {
|
||||
|
Loading…
Reference in New Issue
Block a user