Skip to content

Use json.dumps in Python codegens if Content-Type is JSON.#430

Merged
webholik merged 5 commits intodevelopfrom
issue-426
Feb 26, 2021
Merged

Use json.dumps in Python codegens if Content-Type is JSON.#430
webholik merged 5 commits intodevelopfrom
issue-426

Conversation

@webholik
Copy link
Contributor

@webholik webholik commented Dec 15, 2020

Fixes #426
Before:

payload="{\n    \"Hello\": \"world\",\n    \"boolean\": true,\n    \"array\": [1,2,3]\n}"

After:

payload = json.dumps({
  "Hello": "world",
  "boolean": True,
  "array": [
    1,
    2,
    3
  ]
})

@webholik webholik merged commit c4db059 into develop Feb 26, 2021
@webholik webholik deleted the issue-426 branch February 26, 2021 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import json in Python code generator?

2 participants