-
if i build with System.Text.Json it is 6 mb but it i build with Newtonsoft.Json it is 16 mb, both have the same same size of dll files |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue Detailsif i build with System.Text.Json it is 6 mb but it i build with Newtonsoft.Json it is 16 mb, both have the same size of dll files
|
Beta Was this translation helpful? Give feedback.
-
Newtonsoft.Json doesn't have NativeAOT support at all, so it instead rooting the whole assembly regardless of whether a type will be used or not. |
Beta Was this translation helpful? Give feedback.
Newtonsoft.Json doesn't have NativeAOT support at all, so it instead rooting the whole assembly regardless of whether a type will be used or not.
While System.Text.Json has the support if you are using source generator, so only the necessary part of code will be kept in the binary.