Closed smitha-cgi closed 2 years ago
Hello @smitha-cgi, thanks for using EmbedIO!
Expected behavior Raw JSON is returned without surrounding quotes.
Uhm, no. SendDataAsync
is expected to serialize data. You should use SendStringAsync
to send a string "as is".
I'm not sure why version 3.3.3 worked as you describe, because its source code hansn't ever changed since its introduction in v3.0.0.
Closing as "not a bug".
Describe the bug When a string is returned to a client via SendDataAsync, from version 3.4.1 onwards the string is surrounded by double quotes.
To Reproduce Create a simple class object and convert it into JSON using the Newtonsoft JsonConvert.SerializeObject method. Then return that string to the client via SendDataAsync.
Expected behavior Raw JSON is returned without surrounding quotes.
Screenshots
3.3.3![3 3 3](https://user-images.githubusercontent.com/66452735/167380649-761b0778-bfce-432c-a07f-32a791ef4fa4.png)
3.4.1![3 4 1](https://user-images.githubusercontent.com/66452735/167380680-55e57cb8-51b6-4581-8370-19bad5729179.png)
Desktop (please complete the following information):
Additional context N/A