postgrest-py
postgrest-py copied to clipboard
Use json.dumps instead of str in sanitize_params
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.
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)
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.
Link to the code where this fix should go.
This issue is stale because it has been open for 365 days with no activity.