Skip to content

Conversation

@ZingBallyhoo
Copy link

@ZingBallyhoo ZingBallyhoo commented Sep 8, 2023

Not sure if there's any interest in taking this change, but hey, its here for anyone who needs it :)

Notes:

  • The library is now compatible with trimming & NativeAOT
  • Added actual inheritance support instead of inserting the same base members (e.g name, extensions, extra) in every type. The base types (e.g GltfChildOfRootProperty) were always generated, but weren't used.
  • Minimum target is now .netstandard2.0 (was 1.3)
  • There's no automatic ShouldSerializeXX handling in STJ, so so default value handling is registered through generated code
  • JsonStringEnumConverterWithEnumMemberAttrSupport is required to allow custom serialized enum names. Preview version of STJ 8 is needed to make this trim safe.
  • Removed ArrayConverter
    • See the commit message from when it was added. 90932db. I'm sure this is a leftover from glTF 1.0 or something
  • Removed run-on-build from Generator.csproj (another legacy thing)

Resolves #50
Closes #28

@BoyBaykiller
Copy link

BoyBaykiller commented Sep 27, 2023

Thank you for this contribution. As a user I would definitely want your PR to be merged.
I tested it locally and it works wonderfully.
Not depending on Newtonsoft for JSON parsing is a huge improvement in my opinion.
I've also noticed slightly lower loading times.

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

Successfully merging this pull request may close these issues.

Support for compiling with "Trim unused code" Use System.Text.Json

2 participants