question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exporter: Avoid to export invalid JSON format

See original GitHub issue

AFAIK the * .gltf file should be in JSON format: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0 »The format combines an easily parseable JSON scene description with one or more binary files representing geometry, animations, and other rich data. Binary data is stored in such a way that it can be loaded directly into GPU buffers without additional parsing or other manipulation.«

The JSON specification doesn’t allow NaN as a value or number: https://json.org/

Exporting values as NaN breaks reading the glft file with the standard JSON parsers. I couldn’t trigger such a case with the blender-exporter[2] myself, but others claim that it happens https://github.com/godotengine/godot/issues/21668 and try to push workarounds for the JSON parsers in the importer software.

In the attachment, only the first test-cube is validated by the JSON parser as correct. In the blender-importer [1], the second one stops with python TypeError: list indexes must be integers or slices, not float, the third one loads without an error, which is in my opinion a mistake.

test-NaN.zip

I have created an issue only here, but it affects both [1] https://github.com/julienduroure/gltf2-blender-importer [2] https://github.com/KhronosGroup/glTF-Blender-Exporter

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
juliendurourecommented, Sep 23, 2018

I rename this bug, as it is only an exporter issue (importer part is solved)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mongoexport exporting invalid json files - Stack Overflow
Your post doesn't show how you exported the data from mongo. If you use the following via the terminal, you will get valid...
Read more >
JSON encoding failure generates invalid JSON in export file
When exporting personal data, if the JSON encoding of the groups fails in wp_privacy_generate_personal_data_export_file() , invalid JSON is generated in the ...
Read more >
Why is my full JSON export not a valid JSON? - Zendesk help
Full JSON export files can be very large. While the file is not a valid JSON, each line within the file is valid...
Read more >
Export results to a file gives Invalid Json file - Splunk Community
Solved: When I export my results to a JSON file and then try to validate it with jsonlint.com I get an EOF error....
Read more >
How to prevent ExportString from reencoding diacritics when ...
The Import / Export formats to use for these two different purposes are "Text" and ... As you said, the JSON string generated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found