You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like IEX changed something on their API again making the KeyStat deserialzier fail on null DateTime values
System.Text.Json.JsonException: {"companyName":"Tesla Inc","marketcap":1021367482430,"week52high":1243.49,"week52low":539.49,"week52highSplitAdjustOnly":1243.49,"week52lowSplitAdjustOnly":539.49,"week52change":0.6672896276988147,"sharesOutstanding":1004264852,"float":0,"avg10Volume":19917128,"avg30Volume":24369071,"day200MovingAvg":802.42,"day50MovingAvg":1092.68,"employees":70757,"ttmEPS":3.03,"ttmDividendRate":0,"dividendYield":0,"nextDividendDate":"","exDividendDate":"","nextEarningsDate":"2022-01-26","peRatio":294.5119614848789,"beta":1.8002951554377649,"maxChangePercent":211.8568438677271,"year5ChangePercent":25.425973081120407,"year2ChangePercent":13.137983763345192,"year1ChangePercent":0.6672896276988147,"ytdChangePercent":0.4412260688423768,"month6ChangePercent":0.667563003164505,"month3ChangePercent":0.3813275021391609,"month1ChangePercent":-0.015859960132376116,"day30ChangePercent":-0.015859960132376116,"day5ChangePercent":0.0020296166389153214} ---> System.Text.Json.JsonException: The JSON value could not be converted to System.Nullable1[System.DateTime]. Path: $.nextDividendDate | LineNumber: 0 | BytePositionInLine: 425.
---> System.FormatException: The JSON value is not in a supported DateTime format.
at System.Text.Json.Utf8JsonReader.GetDateTime()
at System.Text.Json.Serialization.Converters.DateTimeConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.Converters.NullableConverter1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[TValue](Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, Type returnType, JsonSerializerOptions options) at IEXSharp.Helper.ExecutorREST.ExecuteAsync[ReturnType](String urlPattern, NameValueCollection pathNVC, QueryStringBuilder qsb, Boolean forceUseSecretToken) --- End of inner exception stack trace --- at IEXSharp.Helper.ExecutorREST.ExecuteAsync[ReturnType](String urlPattern, NameValueCollection pathNVC, QueryStringBuilder qsb, Boolean forceUseSecretToken) at IEXSharp.Helper.ExecutorREST.SymbolExecuteAsync[ReturnType](String urlPattern, String symbol) at IEXSharp.Service.Cloud.CoreData.StockResearch.StockResearchService.KeyStatsAsync(String symbol)
The text was updated successfully, but these errors were encountered:
kewur
changed the title
KeyStat json deserialization fails on null divident value
KeyStat json deserialization fails on null nextdividentdate value
Dec 13, 2021
really? surprised it does. it's possible there is some configuration in my code that might be effecting it then on my environment. I did end up implementing a new call with restsharp though so I'm not using this class anymore, we can close this issue, maybe it was my setup. I even created a unit test by checking out the current IEXSharp HEAD and that was failing as well with the same error.
Looks like IEX changed something on their API again making the KeyStat deserialzier fail on null DateTime values
System.Text.Json.JsonException: {"companyName":"Tesla Inc","marketcap":1021367482430,"week52high":1243.49,"week52low":539.49,"week52highSplitAdjustOnly":1243.49,"week52lowSplitAdjustOnly":539.49,"week52change":0.6672896276988147,"sharesOutstanding":1004264852,"float":0,"avg10Volume":19917128,"avg30Volume":24369071,"day200MovingAvg":802.42,"day50MovingAvg":1092.68,"employees":70757,"ttmEPS":3.03,"ttmDividendRate":0,"dividendYield":0,"nextDividendDate":"","exDividendDate":"","nextEarningsDate":"2022-01-26","peRatio":294.5119614848789,"beta":1.8002951554377649,"maxChangePercent":211.8568438677271,"year5ChangePercent":25.425973081120407,"year2ChangePercent":13.137983763345192,"year1ChangePercent":0.6672896276988147,"ytdChangePercent":0.4412260688423768,"month6ChangePercent":0.667563003164505,"month3ChangePercent":0.3813275021391609,"month1ChangePercent":-0.015859960132376116,"day30ChangePercent":-0.015859960132376116,"day5ChangePercent":0.0020296166389153214} ---> System.Text.Json.JsonException: The JSON value could not be converted to System.Nullable
1[System.DateTime]. Path: $.nextDividendDate | LineNumber: 0 | BytePositionInLine: 425.---> System.FormatException: The JSON value is not in a supported DateTime format.
at System.Text.Json.Utf8JsonReader.GetDateTime()
at System.Text.Json.Serialization.Converters.DateTimeConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
at System.Text.Json.Serialization.Converters.NullableConverter
1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.Serialization.JsonConverter
1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)at System.Text.Json.JsonPropertyInfo
1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter
1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)at System.Text.Json.Serialization.JsonConverter
1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)
at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[TValue](Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, Type returnType, JsonSerializerOptions options) at IEXSharp.Helper.ExecutorREST.ExecuteAsync[ReturnType](String urlPattern, NameValueCollection pathNVC, QueryStringBuilder qsb, Boolean forceUseSecretToken) --- End of inner exception stack trace --- at IEXSharp.Helper.ExecutorREST.ExecuteAsync[ReturnType](String urlPattern, NameValueCollection pathNVC, QueryStringBuilder qsb, Boolean forceUseSecretToken) at IEXSharp.Helper.ExecutorREST.SymbolExecuteAsync[ReturnType](String urlPattern, String symbol) at IEXSharp.Service.Cloud.CoreData.StockResearch.StockResearchService.KeyStatsAsync(String symbol)
The text was updated successfully, but these errors were encountered: