Skip to content

chore: json packages#25

Merged
lucasloisp merged 5 commits intomainfrom
feature/json-package
Mar 25, 2026
Merged

chore: json packages#25
lucasloisp merged 5 commits intomainfrom
feature/json-package

Conversation

@andreydobrikov
Copy link
Collaborator

This pull request updates the management of external dependencies in the SDK by removing the previously bundled NewtonsoftJson and migrating it to a package dependency, while embedding a new Unity Package Manager (UPM) version of the JSON canonicalizer (jsoncanonicalizer-upm). It cleans up legacy plugin files and metadata, introduces new documentation and licensing for the canonicalizer, and adds the canonicalizer's source code directly to the project.

Dependency management changes:

  • Removed all bundled NewtonsoftJson plugin DLLs and their associated .meta and configuration files from SDK/ExternalDependencies, as NewtonsoftJson is now referenced via SDK/package.json as a package dependency. ([[1]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-20719114e8d7172d97e51794666db737186584198ec895be11f5ec0c58e810bbL1-L9), [[2]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-415c66785a7febea5c608c27ac4e403060206d4f085947a5622fc607df3e37e0L1-L129), [[3]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-41bb741da9c257dc2046bf8ec155cdae0719f838788aebe5746ff0eba225ca34L1-L82), F214c1d1L1, [[4]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-6fa042666692424f992de49c8b67a83b8ec376c36fe8788dee7429bd02090dd5L2-R2))
  • Updated SDK/ExternalDependencies/README.md to reflect the new dependency management approach: NewtonsoftJson is now a package dependency, and jsoncanonicalizer-upm is embedded and referenced as an assembly. ([SDK/ExternalDependencies/README.mdL6-R8](https://github.com/privy-io/unity-sdk/pull/25/files#diff-44cdbb0f55a4d8f8944ea96404fd0e0fa2dffd2a1f02fb6f728f36ccedff9424L6-R8))

JSON canonicalizer embedding:

  • Added the jsoncanonicalizer-upm Unity package, including its source code (such as JsonCanonicalizer.cs, NumberCachedPowers.cs, and related .meta files) and a new README.md describing usage, installation, and licensing. ([[1]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-4bc41911aa26d3976fffff8b81868569d40b8d2b5307d156c2cd8b303c84b11dR1-R62), [[2]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-a833a28d07c24247e3660323a1ab1f0445f1adb8d196a830fbd06179dfd841bbR1-R11), [[3]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-8e572a79323f0f71f77644a4524cbb4676a2fde4ea98b7c5ba4d9d42264822c0R1-R170), [[4]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-a5a7b639671bc98eb95885d588e9d2e22450a4bba2067165322ad92bcc937cbbR1-R11), [[5]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-29d50e0e71af13411b1bdd7f13d02066db2199254fb94e9cb800ef57258bbfc6R1-R11))
  • Added the Apache 2.0 license for the canonicalizer and updated relevant .meta files. ([[1]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-08a3d613292835d97d42b2c9b65fe0f67964747e186a3e9381b1fac6e09316b2R1-R13), [[2]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-d4f8a622b7d0215ff36d448bcb3f45f4cc8213e4ce885fb949b216f1e7101432L2-R2))

Cleanup of legacy files:

  • Removed all legacy jsoncanonicalizer plugin DLLs and associated .meta files, as the new UPM package now provides the canonicalizer functionality. ([[1]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-83bf21b0721361b6501834ab0d2f604d2eb924c2c06c0bcde954e3cbc487bb7bL1-L8), [[2]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-519e0fb88549ba54cdc17f5ae60ce6d577d0cc5ab951205efb8424c85ef9dab8L1-L33), [[3]](https://github.com/privy-io/unity-sdk/pull/25/files#diff-d5f560a5503bce5e4e69d59952eec27f79e94c3391afbbc6a98224e3f7d3b4a1L1-L33))
  • Updated the jsoncanonicalizer.meta file with a new GUID to reflect the new package structure. ([SDK/ExternalDependencies/jsoncanonicalizer.metaL2-R2](https://github.com/privy-io/unity-sdk/pull/25/files#diff-f5b10c58af40018280345d75f69ecfd3968b3eae754e531c05b7f13cd69923d3L2-R2))

These changes modernize dependency management, reduce repository bloat, and improve maintainability by leveraging Unity's package system.

@socket-security
Copy link

socket-security bot commented Mar 23, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​com.unity.nuget.newtonsoft-json@​3.2.2100100100100100

View full report

Added clarity for internal package
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need this file? Given we're referencing the asmdef directly and not via upm

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, no. It was nice to have if we wanted to use it with UPM.

andreydobrikov and others added 3 commits March 25, 2026 13:34
Fix nit

Co-authored-by: Lucas Lois <lucas.lois@privy.io>
…JsonCanonicalizer.asmdef


Fixed autoreferencing assembly.

Co-authored-by: Lucas Lois <lucas.lois@privy.io>
@lucasloisp lucasloisp merged commit 834240e into main Mar 25, 2026
4 checks passed
@lucasloisp lucasloisp deleted the feature/json-package branch March 25, 2026 18:30
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.

2 participants