@@ -416,7 +416,11 @@ extension Range: Codable where Bound: Codable {
416
416
let lowerBound = try container. decode ( Bound . self, forKey: . lowerBound)
417
417
let upperBound = try container. decode ( Bound . self, forKey: . upperBound)
418
418
guard lowerBound <= upperBound else {
419
- throw DecodingError . dataCorruptedError ( forKey: CodingKeys . upperBound, in: container, debugDescription: " upperBound (upTo) cannot be lower than lowerBound (from) " )
419
+ throw DecodingError . dataCorruptedError (
420
+ forKey: CodingKeys . upperBound,
421
+ in: container,
422
+ debugDescription: " upperBound (upTo) cannot be less than lowerBound (from) "
423
+ )
420
424
}
421
425
self = lowerBound..< upperBound
422
426
}
@@ -472,7 +476,7 @@ extension PartialRangeUpTo: RangeExpression {
472
476
473
477
extension PartialRangeUpTo : Codable where Bound: Codable {
474
478
private enum CodingKeys : String , CodingKey {
475
- case upperBound = " beginningUpTo "
479
+ case upperBound = " fromStartUpTo "
476
480
}
477
481
478
482
public init ( from decoder: Decoder ) throws {
@@ -529,7 +533,7 @@ extension PartialRangeThrough: RangeExpression {
529
533
530
534
extension PartialRangeThrough : Codable where Bound: Codable {
531
535
private enum CodingKeys : String , CodingKey {
532
- case upperBound = " beginningTo "
536
+ case upperBound = " fromStartThrough "
533
537
}
534
538
535
539
public init ( from decoder: Decoder ) throws {
0 commit comments