KhronosGroup / KhronosGroup/glTF-Project-Explorer

Add field for loaders to indicate what form of JSON parsing is used

Open
#13 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
95
Forks
48
PR merge metrics
No merged PRs in 30d

Description

This discussion started in https://github.com/KhronosGroup/glTF/issues/1699.

@lexaknyazev had a great idea to add a field to Project Explorer specifically for loaders, to indicate what form of JSON parsing they use for the manifest. Most JSON parsers use DOM parsing, but this begins to falter when you exceed a certain threshold (generally based on the computer's available memory) and streaming, SAX-style, JSON parsers often fill this space. Jackson is a good example of a streaming JSON parser that I am immediately aware of.

I've proposed two options so far:

* A boolean flag indicating the loader supports parsing large manifests (threshold around ≥100MiB? higher?)
* A field describing how the JSON parsing works? Is it using a DOM parser or a streaming parser?

And @lexaknyazev voiced interest in the more descriptive field that indicates explicitly using a DOM parser or a SAX/Streaming parser.

I'm currently more a fan of the field as well, but I would urge us to go with "streaming" over SAX as while many of the streaming JSON parsers are SAX-style, some very popular parsers are not. [JSONStream](https://www.npmjs.com/package/JSONStream) comes to mind.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Read glTF issue #1699 and the comments here first, then resolve whether the metadata should be a boolean or explicitly distinguish DOM and streaming JSON parsing. Done means the field's semantics and accepted values are agreed and the Project Explorer loader records can expose them.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.