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

Use json.dumps instead of str in sanitize_params #131

Open
dreinon opened this issue Jun 18, 2022 · 4 comments
Open

Use json.dumps instead of str in sanitize_params #131

dreinon opened this issue Jun 18, 2022 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers Stale

Comments

@dreinon
Copy link
Contributor

dreinon commented Jun 18, 2022

Hi!
It turns out that since we use the str callable to convert a value to string, the output of str([True, 1, 'hi']) would be "[True, 1, 'hi']" instead of the json values '[true, 1, "hi"]'. This forces the user to convert data to string before sending it to our client instead of sending it as regular python types, which could be solved using json.dumps instead of str for this purpose.

@anand2312 anand2312 added bug Something isn't working good first issue Good for newcomers labels Jun 19, 2022
@anand2312
Copy link
Contributor

Can you add a link to the code where this is being done as well? Would make it easy for anyone to make a fix PR 😄 (unless you were planning on making one yourself)

@dreinon
Copy link
Contributor Author

dreinon commented Jun 19, 2022

I'm unfortunately not using my laptop rn, can you add it for me @anand2312? It is the first line of sanitize_params function, which can be found by searching the function name.

@nitd24
Copy link

nitd24 commented Aug 3, 2022

Link to the code where this fix should go.

Copy link

github-actions bot commented May 1, 2024

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the Stale label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Stale
Projects
Status: No status
Development

No branches or pull requests

3 participants