Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

JS not able to parse simplejson dump payload #15

Open
YashishDua opened this issue Apr 5, 2019 · 7 comments
Open

JS not able to parse simplejson dump payload #15

YashishDua opened this issue Apr 5, 2019 · 7 comments

Comments

@YashishDua
Copy link

I explored that this webhook sends data after encoding it using simplejson. Since nothing similar to simplejson exist in JS, it's difficult to decode back to original JSON format.
How to go on this?

Either encode in a scheme which could be reversed using standard packages or don't encode it (which could not be the case of course)
My team urgently needs to fix this, any help would be appreciated.

@markstory
Copy link
Member

Is the payload you're getting valid JSON? Why can't it be parsed?

@YashishDua
Copy link
Author

No it's not a valid json.

@mattrobenolt
Copy link
Contributor

Can you give me an example of something that isn't valid JSON? If that's the case, that's extremely bizarre. simplejson just happens to be a library that implements JSON. It's not it's own flavor or variant of JSON. I've never seen anything from our API or webhooks that aren't JSON compatible. Considering our API is entirely consumed by our frontend JavaScript without any tricks.

@mattrobenolt
Copy link
Contributor

Also, this repository isn't really used anymore and is super old. Everything regarding webhooks is in Sentry core.

@YashishDua
Copy link
Author

A payload which we are getting via webhook contains body inside single quotes and the content inside these single quotes must be a valid JSON which is not. Node js JSON.parse() gives error while parsing it.

@mattrobenolt
Copy link
Contributor

Can you provide an example? Really hard to tell without an example.

@YashishDua
Copy link
Author

Yes, your email id? It's our internal payload.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants