Hi.
We have clients that send a request where “byteOrderMark: true”, after updating SS libraries from 5.0.0 -> 5.5.0 these clients get an error, please tell me how can I restore the old behavior?
"ResponseStatus":{"ErrorCode":"SerializationException","Message":"Type definitions should start with a '{', expecting serialized type 'MD5_Get', got string starting with: { \"input\":\"123456\" }","StackTrace":" в ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType(ReadOnlySpan`1 strType, TypeConfig typeConfig, EmptyCtorDelegate ctorFn, KeyValuePair`2[] typeAccessors)\r\n в ServiceStack.Text.Common.DeserializeType`1.StringToTypeContext.DeserializeJson(ReadOnlySpan`1 value)\r\n в ServiceStack.Text.Json.JsonReader.<>c__DisplayClass3_0.<GetParseSpanFn>b__0(ReadOnlySpan`1 v)\r\n в ServiceStack.Text.JsonSerializer.DeserializeFromSpan(Type type, ReadOnlySpan`1 value)\r\n в ServiceStack.Text.DefaultMemory.Deserialize(MemoryStream ms, Boolean fromPool, Type type, DeserializeStringSpanDelegate deserializer)\r\n в ServiceStack.Text.DefaultMemory.<DeserializeAsync>d__34.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в ServiceStack.Host.RestHandler.<CreateRequestAsync>d__16.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в ServiceStack.Host.RestHandler.<CreateRequestAsync>d__15.MoveNext()\r\n--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---\r\n в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n в ServiceStack.Host.RestHandler.<ProcessRequestAsync>d__14.MoveNext()"}}
tried these options but they did not help:
HttpUtils.UseEncoding = PclExport.Instance.GetUTF8Encoding(true);
JsConfig.UTF8Encoding = new System.Text.UTF8Encoding(true);
and this
SetConfig(new HostConfig { EnableOptimizations = false });