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

Remove dependency on System.Json for net6.0 #6273

Closed
akoeplinger opened this issue Jun 15, 2021 · 2 comments · Fixed by #6463
Closed

Remove dependency on System.Json for net6.0 #6273

akoeplinger opened this issue Jun 15, 2021 · 2 comments · Fixed by #6463
Labels
difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/enhancement New feature or request project/third-party 3️⃣ Categorizes an issue or PR as relevant to 3rd party libraries

Comments

@akoeplinger
Copy link

akoeplinger commented Jun 15, 2021

The System.Json nuget package is deprecated (note: this is a different package than System.Text.Json) and will cause issues when consumed from .NET6-based Xamarin apps.

The reason is that the package ships with _._ entries for the legacy Xamarin TFMs which will be pulled in via NuGet compatibility fallbacks, however there is no System.Json assembly in the net6.0 shared framework (see dotnet/designs#222 for some lengthy discussion).

To fix the issue you'll need to multi-targetting to net6.0 and remove the dependency on System.Json there.

/cc @jeromelaban

@akoeplinger akoeplinger added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/enhancement New feature or request triage/untriaged Indicates an issue requires triaging or verification labels Jun 15, 2021
@carldebilly
Copy link
Member

System.Json is used by the Uno's Lottie Add-in to update the json document with custom resources (mostly colors). System.Text.Json can't be used because its JsonDocument is read-only and it seems there's no efficient way to update a json document with it.

On Android, there's a dependency to Newtonsoft's Json.NET because there's a bug in LottieXamarin for Android.

@jeromelaban
Copy link
Member

jeromelaban commented Jun 15, 2021

Thanks for the update @akoeplinger!

We're still looking at integrating with .NET 6, and we hope that Preview 5 will help us move forward. The dependency on System.Json is the least of the problems (we could pull in the whole System.Json code as a workaround), as I'm not sure if the dependency on https://github.com/Baseflow/LottieXamarin will work on .NET 6 anyways.

GitHub
Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin - Baseflow/LottieXamarin

@jeromelaban jeromelaban removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. triage/untriaged Indicates an issue requires triaging or verification labels Jun 15, 2021
@jeromelaban jeromelaban added difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding project/third-party 3️⃣ Categorizes an issue or PR as relevant to 3rd party libraries labels Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/enhancement New feature or request project/third-party 3️⃣ Categorizes an issue or PR as relevant to 3rd party libraries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants