raven-python icon indicating copy to clipboard operation
raven-python copied to clipboard

JSON data getting very escaped

Open tomhamiltonstubber opened this issue 8 years ago • 1 comments

We're getting JSON data like:

{
  'contractors': [{
    'id': 456789,
    'name': 'John Smith'
  }],
  'date': '2017-1-1T00:00:00Z',
  'description': 'GCSE Exam',
  'recipients': [{
    'client_name': 'Brain Johnson',
    'id': 123456,
    'name': 'Cara Johnson'}],
  'reference': [12345, 56789],
}

coming through to Sentry like:

[{
  "'items'": [{
    "'date'": "'\\'\"u\\\\\\'datetime.datetime(2017, 1, 1, 0, 0, tzinfo=<UTC>)\\\\\\'\"\\''",
    "'contractors'": "'\\'\\\\\\'[{u\"\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'name\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'\": u\"\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'John Smith\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'\", u\"\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'id\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'\": u\"\\\\\\\\\\\\\\'456789\\\\\\\\\\\\\\'\"}]\\\\\\'\\''",
    "'recipients'": "'\\'\\\\\\'[{u\"\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'name\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'\": u\"\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'Brain Johnson\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'\", u\"\\\\\\\\\\\\\\'\\\\\\\\\\\\\\'...",
    "'description'": "'\\'\\\\\\'u\"\\\\\\\\\\\\\\'GCSE Exam\\\\\\\\\\\\\\'\"\\\\\\'\\''",
    "'reference'": "'\"\\'[12345, 56789]\\'\"'"
  }]
}]

Let me know if you need any more details.

tomhamiltonstubber avatar May 02 '17 11:05 tomhamiltonstubber

Same here.. if I call

client.captureMessage("test message", extra={"a": {"b": ["c"]}})

my Sentry report looks like:

captura de pantalla 2018-05-10 a la s 09 43 47

rowanseymour avatar May 10 '18 14:05 rowanseymour