Currently, I'm dealing with sending data in JSON format over the server.
Although I am facing issues with flask.jsonify()
, that is a separate matter from this question.
To assist me in returning data in JSON format, I've turned to Marshmallow. By using marshmallow.Schema.dump(query)
, the output looks something like this:
[{'id': 1, 'title': 'title', 'content': 'some content'},
{'id': 2, 'title': 'another title', 'content': 'some more content'},
...]
My query now focuses on whether the JavaScript file anticipates the content with or without the square brackets.
I am under the impression it should be without the square brackets, which is what flask.jsonify()
aims to remove, correct?