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

Why isn't the json data written as binary data? #348

Closed
axelf4 opened this issue Jan 17, 2015 · 7 comments
Closed

Why isn't the json data written as binary data? #348

axelf4 opened this issue Jan 17, 2015 · 7 comments

Comments

@axelf4
Copy link

axelf4 commented Jan 17, 2015

Is it not a bit counter-intuitive considering that your goal is to be simple and fast?

@fabrobinet
Copy link
Contributor

Take a browser nowadays, all the JSON parsing is done for you. So it is simple AND fast. Also the big payload isn't in the JSON... Yes, you could certainly load a big binary blob and parse it using typed array API to be fast but I wouldn't call that so "simple".

We actually considered another form of binary JSON can you remind me @pjcozzi ? but that's post v1.0.

@axelf4
Copy link
Author

axelf4 commented Jan 17, 2015

Well, I'm programming in C/C++ so JSON is a big hassle. Guess this file format isn't for me. Sorry if I've bothered you.

I just think it's strange - a format for OpenGL, where native applications are more widespread.

@axelf4 axelf4 closed this as completed Jan 17, 2015
@fabrobinet
Copy link
Contributor

@pwnedary there are tons of C++ JSON library, not to mention that they are part of SDK if you use iOS (and probably Android too). But it is true that the first version of glTF is targeting more web and mobile than desktop.

@pjcozzi
Copy link
Member

pjcozzi commented Jan 18, 2015

@fabrobinet for binary, we considered http://msgpack.org/. @tfili and I are actually looking at this now.

@fabrobinet fabrobinet mentioned this issue Feb 22, 2015
@isral
Copy link

isral commented Feb 23, 2020

@fabrobinet for binary, we considered http://msgpack.org/. @tfili and I are actually looking at this now.

Is it already implemented or already rejected?
I'm looking for pure binary gltf (no textual json) and I stumble to this issue.

@donmccurdy
Copy link
Contributor

@isral glTF remains a JSON-based format today. If you need a good C loader, I would suggest cgltf. Or if you do prefer to avoid JSON entirely, you could reformat a .gltf file with MessagePack and deserialize the binary data in your application.

@emackey
Copy link
Member

emackey commented Feb 24, 2020

We've had good results from tinygltf which is a header-only library for C++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants