Skip to content

Commit cab22c8

Browse files
committed
Fixed a case where a successful avs result wouldn't deserialize properly.
1 parent 045349e commit cab22c8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Rentler.SmartyStreets/SmartyStreetsAddress.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public class Metadata
7272
public double longitude { get; set; }
7373
public string precision { get; set; }
7474
public string time_zone { get; set; }
75-
public int utc_offset { get; set; }
75+
public string utc_offset { get; set; }
7676
public bool dst { get; set; }
7777
}
7878

src/Rentler.SmartyStreets/SmartyStreetsClient.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ public async Task<IEnumerable<SmartyStreetsAddress>> GetStreetAddress(
6969

7070
var url = client.CreateAddress("street-address", args);
7171
var response = await client.Post(url);
72-
var obj = JsonSerializer.DeserializeFromStream<SmartyStreetsAddress[]>(response)
73-
??
74-
new SmartyStreetsAddress[] { };
75-
76-
return obj;
72+
return JsonSerializer.DeserializeFromStream<SmartyStreetsAddress[]>(response)
73+
??
74+
new SmartyStreetsAddress[0];
7775
}
7876

7977
/// <summary>

0 commit comments

Comments
 (0)