jet-client-support icon indicating copy to clipboard operation
jet-client-support copied to clipboard

Allow comments in JSON (and XML) body

Open marc-van-breemen opened this issue 1 year ago • 1 comments

Is your feature request related to a problem?

No

Describe the solution you'd like

I'm aware that JSON is data only.

However when testing API's it can be convenient to have comments in them.

For example:"

{
  "JnCd": 15,  // This is a journal code
  // Transaction information:
  "TrIn": {
     "Amount": 1234.50
  }  
}

What JetClient could do is strip out the comments, identified by "//", before sending the JSON body to the API endpoint.

Additional context

No response

marc-van-breemen avatar Jun 05 '24 11:06 marc-van-breemen

Thank you for your suggestion. I just released version 2024.2.4, which includes support for comments in the JSON body, along with other JSON5 features such as trailing commas, single quotes, and unquoted keys. These JSON5 bodies are automatically converted to JSON when the request is sent.

Regarding XML support, I will consider adding this feature in the future.

AntonShuvaev avatar Jun 05 '24 12:06 AntonShuvaev