-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid JSON in the API #47
Comments
I have the same issue with another competition. |
Thanks for reporting this.
The whole API is under reconstruction where there will be a lot more and
better validation on these issues.
What is the eventid you have issues with?
Den fre 1 okt. 2021 kl 13:52 skrev eVe9n ***@***.***>:
… I have the same issue with another competition.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOXVUU7BS2X4D74IKRXZ53UEWOHRANCNFSM4PKOAOTA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Sorry I didn't save the eventid I remember the name started with MTBO. Right now it doesn't return any error. |
I have the same issue with another competition: "id":22247, "name":" Mistrovství ČR ve sprintu" Also, It's difficult to me if the JSON return a extra double quotes. For example in this competition: 2022-05-07 ДП 20-21 Средна дистанция / купа "Христо Ботев" БФО, Вариант5 |
Just found out the API to retrieve the events was delivering invalid JSON due to some events having TAB-characters (ASCII 9) in their name: I cleaned up those events manually and so the JSON seems to be clean... for now. :) |
http://liveresultat.orientering.se/api.php?method=getcompetitions is now serving an invalid JSON because of a tab character inside " BEL_Ve Sprint Rocourt" competition. Tab characters and other special characters should be escaped on JSON when used inside strings https://www.freeformatter.com/json-escape.html.
I suppose that using
json_encode
to build the JSON as suggested in #43 should solve the problem. Otherwise you would have to manually escape this special chars before building the JSON.The text was updated successfully, but these errors were encountered: