Skip to content

Fix Client.request returning raw strings instead of dicts#12

Open
Deadpool2000 wants to merge 1 commit intoopenapi:mainfrom
Deadpool2000:fix-issue-6
Open

Fix Client.request returning raw strings instead of dicts#12
Deadpool2000 wants to merge 1 commit intoopenapi:mainfrom
Deadpool2000:fix-issue-6

Conversation

@Deadpool2000
Copy link

@Deadpool2000 Deadpool2000 commented Mar 18, 2026

#6 I noticed that Client.request() sometimes returns double-encoded JSON as a raw string instead of a parsed dictionary. This forces users (especially in Flask apps) to manually write json.loads(resp) repeatedly, which is a bit of a hassle.

This PR fixes that by ensuring we automatically decode the string into a dict under the hood, saving everyone from writing extra boilerplate.

Let me know if you need any changes!

…n Client.request

fix: decode raw JSON strings to dictionaries in client.request() to remove Flask boilerplate

fix: natively decode stringified API responses into JSON dicts within the SDK~
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.

1 participant