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
Using B1Slayer 2.0.0 I get an AggregateException when trying to PingAsync(). No matter if using v1 or v2. Looks like the deserialization of the Unix timestamp string to Decimal does not work as expected. Probably System.Text.Json is stricter here than Json.NET was.
System.AggregateException: One or more errors occurred. (Response could not be deserialized to JSON: GET https://localhost:50000/ping/)
---> Flurl.Http.FlurlParsingException: Response could not be deserialized to JSON: GET https://localhost:50000/ping/
---> System.Text.Json.JsonException: The JSON value could not be converted to System.Decimal. Path: $.timestamp | LineNumber: 0 | BytePositionInLine: 75.
---> System.InvalidOperationException: Cannot get the value of a token type 'String' as a number.
Stack Trace:
ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType)
Utf8JsonReader.TryGetDecimal(Decimal& value)
Utf8JsonReader.GetDecimal()
JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)
JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack)
JsonTypeInfo`1.Deserialize(Stream utf8Json)
DefaultJsonSerializer.Deserialize[T](Stream stream)
FlurlResponse.GetJsonAsync[T]()
--- End of inner exception stack trace ---
SLConnection.ExecutePingAsync(String path)
SLConnection.PingAsync()
The text was updated successfully, but these errors were encountered:
Using B1Slayer 2.0.0 I get an AggregateException when trying to
PingAsync()
. No matter if usingv1
orv2
. Looks like the deserialization of the Unix timestampstring
toDecimal
does not work as expected. ProbablySystem.Text.Json
is stricter here thanJson.NET
was.Response from ServiceLayer
Exception
The text was updated successfully, but these errors were encountered: