I was wondering if anyone else was having trouble parsing JSON data from the API where the user’s content contains a backslash. I’m aware of the backslashes before the quotes that are normal to JSON, and that is not what I am talking about. I’m referring to backslashes within the actual content of the users text field.
an example of this that I just found would be:
(edit: So the original string contains backslashes, but it looks like twitch’s forum removes them… if only that was the policy for user content as well! They are there, please take my word for it)
I’m using try catch blocks to weed out these people with backslashes in their content but was wondering what else (if anything) can be done to parse that? Is anyone else experiencing difficulty with this or know a solution?
Escaping a single backslash also seems to be a no-go since that disrupts the generic format of the response anyway, which looks like this:
“status” : “user content is in here content”
or something along those lines.