-1

Hi i have a controller to return translations:

 [HttpGet("/api/getpublictranslations")]
    public async Task<Dictionary<string, string>> Getpublictranslations([FromQuery(Name = "locale")] string locale
    {
        try
        {
            return await _translationBusiness.GetPublicTranslation(locale);
        }
        catch (Exception ex)
        {
            _logger.LogError(ex.Message, ex);
            throw;
        }
    }

when i test my api i have some escape character on the reponse of api normally \n and not \\n enter image description here

because on db i have: enter image description here

do you know how can i delete this escape character from reponse?

user1428798
  • 1,534
  • 3
  • 24
  • 50

1 Answers1

0

if you want to completely remove these characters try this : .Replace(" \\n", "") if you want to keep "end line" character try this : .Replace("\\n", "\n")

R.Abbasi
  • 89
  • 10