Utils.JsonSerialize not working for PlaceGTT Orders

Adhikar
Hi

I am getting the below error from Utils.JsonSerialize for placing PlaceGTT Orders.

The same function is called during "GetOrderMargins" and it works fine.

The below is the error I am getting.

ex.StackTrace
" at System.Text.Json.JsonWriterHelper.NeedsEscaping(ReadOnlySpan`1 value, JavaScriptEncoder encoder)\r\n
at System.Text.Json.JsonEncodedText.EncodeHelper(ReadOnlySpan`1 utf8Value, JavaScriptEncoder encoder)\r\n at
System.Text.Json.JsonEncodedText.TranscodeAndEncode(ReadOnlySpan`1 value, JavaScriptEncoder encoder)\r\n
at System.Text.Json.JsonEncodedText.Encode(String value, JavaScriptEncoder encoder)\r\n
at System.Text.Json.WriteStackFrame.WriteObjectOrArrayStart(ClassType classType, Utf8JsonWriter writer, JsonSerializerOptions options, Boolean writeNull)\r\n
at System.Text.Json.JsonSerializer.HandleEnumerable(JsonClassInfo elementClassInfo, JsonSerializerOptions options, Utf8JsonWriter writer, WriteStack& state)\r\n
at System.Text.Json.JsonSerializer.Write(Utf8JsonWriter writer, Int32 originalWriterDepth, Int32 flushThreshold, JsonSerializerOptions options, WriteStack& state)\r\n
at System.Text.Json.JsonSerializer.WriteCore(Utf8JsonWriter writer, Object value, Type type, JsonSerializerOptions options)\r\n
at System.Text.Json.JsonSerializer.WriteCore(PooledByteBufferWriter output, Object value, Type type, JsonSerializerOptions options)\r\n
at System.Text.Json.JsonSerializer.WriteCoreString(Object value, Type type, JsonSerializerOptions options)\r\n
at System.Text.Json.JsonSerializer.Serialize[TValue](TValue value, JsonSerializerOptions options)\r\n
at KiteConnect.Utils.JsonSerialize(Object obj) in F:\\Coding\\KiteConnect\\19-Sep-2021\\dotnetkiteconnect-master\\KiteConnect\\Utils.cs:line 52\r\n
Sign In or Register to comment.