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

Access to arbitrary JSON meta-data #734

Open
atteneder opened this issue Dec 10, 2024 · 0 comments
Open

Access to arbitrary JSON meta-data #734

atteneder opened this issue Dec 10, 2024 · 0 comments
Labels
enhancement New feature or request import Import of glTF files run-time
Milestone

Comments

@atteneder
Copy link
Owner

The current API introduced in 6.0.0 and driven by Newtonsoft JSON gives access to meta-data on any JSON object via a TryGetValue<T>(string key) method.

The properties (i.e. their keys and value type) are not know in some use-cases and for that users need to be able to query or iterate them.

Here's some initial suggestion to add on any de-serialization class:

  1. bool HasProperty(string key, out Type propertyType)
  2. IEnumerable<string> GetPropertyKeys which iterates all non-known properties.
  3. T GetPropertyValue<T>(string key) to retrieve a property's value.

While Newtonsoft JSON would be capable of that, the dual de-serialization class setup (GLTFast.Schema vs. GLTFast.Newtonsoft.Schema) did not allow us to add this without breaking the API or compromising bad design in the API.

@atteneder atteneder added enhancement New feature or request import Import of glTF files run-time labels Dec 10, 2024
@atteneder atteneder added this to the 7.0 milestone Dec 10, 2024
@atteneder atteneder moved this from To do to Planned in glTFast development Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request import Import of glTF files run-time
Projects
Status: Planned
Development

No branches or pull requests

1 participant