Skip to content
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

Trailing Commas in JSON - Errors in IE8 #1943

Closed
EZWrighter opened this issue Mar 10, 2015 · 12 comments
Closed

Trailing Commas in JSON - Errors in IE8 #1943

EZWrighter opened this issue Mar 10, 2015 · 12 comments
Labels

Comments

@EZWrighter
Copy link

The latest release (4.12.3) has some json objects being created with trailing commas after the last item. Which is illegal and is causing IE8 to throw an error and not work.

The 3 extra commas are from vtt.js include section of the video.js library. I have manually removed the commas in my dev version and things work fine now.

Here is the regex to easily find them: ,[\s\r\n]*}

@heff
Copy link
Member

heff commented Mar 11, 2015

That's interesting. It's working for me in IE8 without errors, at least on this demo page. http://vjs.zencdn.net/4.12.3/demo.html

We would probably need to make this change in VTT.js for it to persist. Could you check if you see the same commas in that project?

@heff heff added the bug label Mar 11, 2015
@gkatsev
Copy link
Member

gkatsev commented Mar 11, 2015

I've noticed this as well. This is only an issue in the non-minified code.

@heff
Copy link
Member

heff commented Mar 11, 2015

Would either of you be willing to throw together a quick PR to fix it in VTT.js?

@gkatsev
Copy link
Member

gkatsev commented Mar 11, 2015

If @EZWrighter does a PR, that would be cool and I'll get it merged into my build branch.
Otherwise, I'll try to get to it this week.

@EZWrighter
Copy link
Author

My guess is your minified version goes through some kind of lint filter that automatically removes them.

Yes, I checked the VTT.js project and it has illegal commas in it's JSON as well. @gkatsev, you will probably get to it faster than me. :-(

@pcting
Copy link

pcting commented Mar 17, 2015

I'm waiting for this pull request to get merged: mozilla/vtt.js#339

pcting added a commit to pcting/vtt.js that referenced this issue Mar 18, 2015
@mmcc
Copy link
Member

mmcc commented Apr 1, 2015

Looks like mozilla/vtt.js#339 got pulled in. @gkatsev is there anything left to do before we close this?

@gkatsev
Copy link
Member

gkatsev commented Apr 1, 2015

Yes, I need to update our custom build.

@gkatsev
Copy link
Member

gkatsev commented Apr 1, 2015

I should be able to get to it in the next couple of days.

@axnd
Copy link

axnd commented Jul 2, 2015

@gkatsev bump, any chance this can get landed?

@gkatsev
Copy link
Member

gkatsev commented Jul 8, 2015

Working on it. Have the patched vttjs available here: https://github.com/gkatsev/vtt.js/tree/vjs-v0.12.1

@gkatsev
Copy link
Member

gkatsev commented Oct 15, 2015

I believe this is fixed now if you use one of the latest 4.12.releases.

@gkatsev gkatsev closed this as completed Oct 15, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants