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

elasticsearch - what is the equivalent data type for geo_point in hibernate search? -

firebase - How to wait value in Ionic 2 -

Jenkins: find build number for git commit -