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
Post a Comment