Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow comments in JSON (and XML) body #78

Open
marcvanbreemen opened this issue Jun 5, 2024 · 1 comment
Open

Allow comments in JSON (and XML) body #78

marcvanbreemen opened this issue Jun 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@marcvanbreemen
Copy link

marcvanbreemen commented Jun 5, 2024

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

@marcvanbreemen marcvanbreemen added the enhancement New feature or request label Jun 5, 2024
@AntonShuvaev
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants