Illegal characters within ticketfly json

37 views
Skip to first unread message

Charlie Simpson

unread,
Jul 10, 2015, 11:27:23 AM7/10/15
to ticket...@googlegroups.com
Hey there, 

So I've worked with your api for a bit, and all seemed to work well initially. But began to notice some event call fails, and it was breaking my application. I'm using JSONP to make the calls. 

The main js console error was:
Uncaught SyntaxError: Unexpected token ILLEGAL

It looks to be due to invalid characters within the JSON itself. 
You will see in this jsfiddle (https://jsfiddle.net/csimpson24/7uxg6g8b/), a few red dots sporadically around the code. These red dots are the illegal characters, and are what is causing the break. 
After doing a ton of research for workarounds, this issue isn't fixable on the client side, but some filtering on the server side could resolve it. 

Is there any way for you guys to filter out these illegal characters throughout your event database, or do something similar?

Also, I hear using CORS instead of JSONP might be able to solve some of these character issues. Do you support CORS?

Thanks!

Bill Rousseau

unread,
Jul 10, 2015, 6:55:03 PM7/10/15
to ticket...@googlegroups.com
Hi Charlie,

Thanks for sharing. I don't think we will be getting to sanitizing content like this in our DB soon. Your filtering approach seems prudent for now. 

Thanks!
-b

Charlie Simpson

unread,
Jul 10, 2015, 9:57:04 PM7/10/15
to ticket...@googlegroups.com
Hey Bill, 

Thank you for the response, although I wanted to clarify, there is no filtering we can do to fix the data because our access is only client side (not server side). The problem is server side only so really, it can only be fixed by ticketfly. Without any content sanitizing, we are forced to deal with broken applications (and will probably need to switch music API's). Unless of course you support another way of accessing your API aside from JSONP. Any word on whether or not you support CORS???

Thanks again!
Reply all
Reply to author
Forward
0 new messages