Sep 29 2022 06:56 AM
Hello All,
I am having an encoding Issue in .Net core Application. Here are the details:
When i submit a request through postman to my .net core web api with request body contains special characters as below (жарко). I could able to serialize them and get the response back as special characters.
Followed microsoft document:
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/character-encoding
{
"Date": "2019-08-01T00:00:00-07:00",
"TemperatureCelsius": 25,
"Summary": "жарко"
}
But when i submit the same Request using SoapUi tool, the Summary field in the request body is converting as (??????) and am unable to serialize them.
I have followed the jsonserializerOptons but did not work for me .
options = new JsonSerializerOptions
{
Encoder = JavaScriptEncoder.Create(UnicodeRanges.BasicLatin, UnicodeRanges.Cyrillic),
WriteIndented = true
};
jsonString = JsonSerializer.Serialize(weatherForecast, options);
Could someone help me, whats is happening with SoapUi request and unable to serialize it?
thanks in advance.
Sep 29 2022 06:31 PM
Hi @venkikalva,
Thanks for posting your issue here.
However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
Best Regards,
Lan Huang