web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Postman Shows Backslashes and Escape Characters in JSON Response - How to Fix

(3) ShareShare
ReportReport
Posted on by 97
 
Hello,
I'm trying to send worker information via code, but I'm having a problem with the code's output format. It's inconsistent and contains a backslash (\). Honestly, I've tried many solutions, but they're giving me results with the wrong format.
 
 
 
Result on PostMan
 
 
 
 
"{\"PersonnelNumber\": \"HQ-0007\", \"OfficeLocation\": \"Sulaymaniyah\"}"
 
First, why does the symbol \ appear in the result?
Second, I want the result to look like this:
 
"{
"PersonnelNumber": "HQ-0007",
"OfficeLocation": "Sulaymaniyah"
}"
 
I need the correct code to display the result as required.
 
 Thank You
 
 
 
 
I have the same question (0)
  • Suggested answer
    #ManoVerse Profile Picture
    455 on at
    try JSON Object like below 
     
    System.Text.Json.JsonObject jsonObj = new System.Text.Json.JsonObject();
    jsonObj.Add("PersonnelNumber", worker.PersonnelNumber);
    jsonObj.Add("OfficeLocation", officeLocation);
    return jsonObj.ToString(); 
     
     
  • André Arnaud de Calavon Profile Picture
    300,977 Super User 2025 Season 2 on at
    Moved the question from the Dynamics 365 General to the Dynamics 365 Finance/Human Resources forum.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 672 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 534 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 289 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans