Open AloisKraus opened 2 years ago
Unlikely. It wasn’t designed for AOT and adding something like a generator would be a huge amount of work.
@JamesNK So what now? Will there be a compatible version or should I look for a different Json Package? I'm not able to publish my app on iOS unless I have it use the interpreter.
@JamesNK So what now? Will there be a compatible version or should I look for a different Json Package? I'm not able to publish my app on iOS unless I have it use the interpreter.
use System.Text.Json
Không thể. Nó không được thiết kế cho AOT và việc thêm một thứ gì đó như máy phát điện sẽ là một khối lượng công việc khổng lồ.
why??
adding something like a generator would be a huge amount of work
Would just falling back to reflection in the AOT scenario be a more feasible step forward? My guess is that reflection is plenty fast enough for most users.
@madelson
Would just falling back to reflection in the AOT scenario be a more feasible step forward? My guess is that reflection is plenty fast enough for most users.
AOT includes trimming, which strips away a lot of reflection metadata. Source generation is basically a requirement for the AOT scenario.
Stephen Toub has mentioned in https://devblogs.microsoft.com/dotnet/performance_improvements_in_net_7/comment-page-3/#native-aot
that if you publish a .NET 7 application with AOT support no JIT compiler exists. Is Json.NET able to work around that like System.Text.Json which has since .NET 6.0 compile time source generator support? I would love to continue to use Json.NET because it I still want to target .NET 4.8.