Improved the way we convert messages to json to prevent messages with
invalid xml to end up in the error queue. #SB-83 Done