Skip to content

[sqs] weird encoding in message body #9331

@dacevedo12

Description

@dacevedo12

I was playing with sqs + event source mapping and found an error on a lambda that works OK with real SQS

turns out, moto formats the message with

return escape(self._body).replace('"', """).replace("\r", "
")

which results in message bodies that are not JSON parseable

seems like a pretty old change, do you recall the rationale behind .replace('"', """)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions