@@ -60,7 +60,8 @@ extension SearchResponse: Codable {
6060 self . params = try container. decodeIfPresent ( forKey: . params)
6161 self . message = try container. decodeIfPresent ( forKey: . message)
6262 self . aroundLatLng = try container. decodeIfPresent ( forKey: . aroundLatLng)
63- self . automaticRadius = try container. decodeIfPresent ( forKey: . automaticRadius)
63+ let legacyAutomaticRadius : String ? = try container. decodeIfPresent ( forKey: . automaticRadius)
64+ self . automaticRadius = legacyAutomaticRadius. flatMap ( Double . init)
6465 self . serverUsed = try container. decodeIfPresent ( forKey: . serverUsed)
6566 self . indexUsed = try container. decodeIfPresent ( forKey: . indexUsed)
6667 self . abTestVariantID = try container. decodeIfPresent ( forKey: . abTestVariantID)
@@ -94,7 +95,8 @@ extension SearchResponse: Codable {
9495 try container. encodeIfPresent ( params, forKey: . params)
9596 try container. encodeIfPresent ( message, forKey: . message)
9697 try container. encodeIfPresent ( aroundLatLng, forKey: . aroundLatLng)
97- try container. encodeIfPresent ( automaticRadius, forKey: . automaticRadius)
98+ let legacyAutomaticRadius = automaticRadius. flatMap { " \( $0) " }
99+ try container. encodeIfPresent ( legacyAutomaticRadius, forKey: . automaticRadius)
98100 try container. encodeIfPresent ( serverUsed, forKey: . serverUsed)
99101 try container. encodeIfPresent ( indexUsed, forKey: . indexUsed)
100102 try container. encodeIfPresent ( abTestVariantID, forKey: . abTestVariantID)
0 commit comments