How to convert json value with multiple lines to string?
{"responsemessage"= "hi, how are you?
yes, I'm fine."}
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Bala SRank #1,394 · 1.2K reputationPosted Jul 17, 2021, 12:29 AM EDT
using JsonSerializer.Serialize,
can able to do it.
please refer below
https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-how-to?pivots=dotnet-5-0
Ravinder SharmaRank #1,211 · 1.5K reputationPosted Jul 18, 2021, 8:41 PM EDT
Bala SRank #1,394 · 1.2K reputationPosted Jul 17, 2021, 12:28 AM EDT