Request body should be able to be commented

I think it’s easier if request body can be commented. :point_down:
“product”: “{{displayName}}”,
// “price” : “15.5”

Sorry in advance, I am not sure what to tag to.

JSON, the format used, does not allow comments.


Thank you for your answer, I also expect this answer.
I think we are using Postman, it is a tool.
The commenting out should be helped by the tool also. The testing should be easier if it can be commented out. If It is still insisted json can’t be commented out. It should be found a better ways.

As you can see we can embed a variable into the json body. The reason is Postman is a tool.
For example, before I post a request body in JS IDE, I also can comment out those json in the IDE also.
Why can’t Postman comment it out?

Which IDE supports that?

I mentioned about JS IDE, it is my mistake.
I confused between an JS object and json object. I think probably this suggestion will not work.

Thank you for your reply.

I think I found some solution of solving my problem:


Body Tab:


Pre-request Script Tab:
object = {
// product: “{{displayName}}”,
price : “15.5”
pm.environment.set(“object”, JSON.stringify(object));


1 Like

This is actually not a bad idea. I am glad you have found a solution and thank you for sharing👍