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

Integer check on accessor.count #109

Closed
julienduroure opened this issue Dec 18, 2018 · 6 comments
Closed

Integer check on accessor.count #109

julienduroure opened this issue Dec 18, 2018 · 6 comments

Comments

@julienduroure
Copy link

Based on this file : https://github.com/KhronosGroup/glTF-Blender-IO/files/2685805/toy_car_gltf.tar.gz

Online validator says that gltf is valid, but there is a accessor.count of 708.0.
Spec says that count must be integer, but 708.0 is not an integer

@lexaknyazev
Copy link
Member

This is a known issue mentioned in the readme. JavaScript's JSON.parse doesn't distinguish between integers and doubles so it's impossible to check such values without parsing JSON manually.

@lexaknyazev
Copy link
Member

Command-line version doesn't use JavaScript runtime and marks accessor.count of 708.0 as invalid.

@emackey
Copy link
Member

emackey commented Dec 20, 2018

Looks like VSCode's copy of the validator catches this. 👍

@lexaknyazev
Copy link
Member

In VSCode, JSON schemas catch this, not the validator.

@emackey
Copy link
Member

emackey commented Dec 20, 2018

In VSCode, JSON schemas catch this, not the validator.

Ah of course!

@emackey
Copy link
Member

emackey commented Sep 23, 2020

I don't think there's anything to do here. JSON.parse isn't going to detect the .0, but there are other ways to detect it (use the commandline version, for example).

Let me know if this should be reopened for any reason.

@emackey emackey closed this as completed Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants