From 83e4ed65a7e8d298c7d155b76b84f8650dacda98 Mon Sep 17 00:00:00 2001 From: webwarrior Date: Wed, 4 Sep 2024 14:49:35 +0200 Subject: [PATCH] GrpcModels: fix in Match type deserialization Fix in Match type deserialization (Partial case). --- src/FX.GrpcModels/ModelSerialization.fs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/FX.GrpcModels/ModelSerialization.fs b/src/FX.GrpcModels/ModelSerialization.fs index 8d4052a..800629e 100644 --- a/src/FX.GrpcModels/ModelSerialization.fs +++ b/src/FX.GrpcModels/ModelSerialization.fs @@ -31,6 +31,9 @@ module ModelSerialization = if reader.TokenType <> JsonTokenType.PropertyName || reader.GetString() <> "Amount" then raise <| JsonException() // "Amount" value + reader.Read() |> ignore + if reader.TokenType <> JsonTokenType.Number then + raise <| JsonException() let amount = reader.GetDecimal() reader.Read() |> ignore if reader.TokenType <> JsonTokenType.EndObject then