Strange Results when trying to create JSON output from simple Python Array -




i have written code:

myarray = [] myarray.append('abc') myarray.append('def') return json.dumps(myarray) 

this part of graphql function. equivalent of this:

"myarray": "[\"abc\", \"def\"]" 

how can eliminate backslashes?

robert

you haven't shown enough code reproduce error. presumably, whatever calling function converting json. should return myarray directly, without converting json in function.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -