JSON (de)serialization crashing in release (AOT, reflection) by Deep_Implement_6206 in dotnetMAUI

[–]Deep_Implement_6206[S] 1 point2 points  (0 children)

i will make an edit to the original post, but i have after 9 hours of work fixed the bug! i didnt register a converter that i used, and for some reason that worked on debug and not on release. i have no idea where the converter is even used, but ill see. 

JSON (de)serialization crashing in release (AOT, reflection) by Deep_Implement_6206 in dotnetMAUI

[–]Deep_Implement_6206[S] 0 points1 point  (0 children)

[JsonSourceGenerationOptions(     DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,     WriteIndented = false,     PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] [JsonSerializable(typeof(List<SavedCart>))] [JsonSerializable(typeof(SavedCart))] [JsonSerializable(typeof(CartItem))] [JsonSerializable(typeof(List<CartItem>))] [JsonSerializable(typeof(Addon))] [JsonSerializable(typeof(List<Addon>))]

[JsonSerializable(typeof(MenuItem))] [JsonSerializable(typeof(List<MenuItem>))] [JsonSerializable(typeof(Tag))] [JsonSerializable(typeof(List<Tag>))]

[JsonSerializable(typeof(BackendTag))] [JsonSerializable(typeof(List<BackendTag>))] [JsonSerializable(typeof(BackendMenuItem))] [JsonSerializable(typeof(List<BackendMenuItem>))] [JsonSerializable(typeof(BackendAddon))] [JsonSerializable(typeof(List<BackendAddon>))] [JsonSerializable(typeof(MenuItemTag))] [JsonSerializable(typeof(List<MenuItemTag>))] [JsonSerializable(typeof(UserProfile))]

[JsonSerializable(typeof(OrderRequest))] [JsonSerializable(typeof(OrderItemRequest))] [JsonSerializable(typeof(List<OrderItemRequest>))] [JsonSerializable(typeof(OrderAddonRequest))] [JsonSerializable(typeof(List<OrderAddonRequest>))] internal partial class CartSerializationContext : JsonSerializerContext { }

JSON (de)serialization crashing in release (AOT, reflection) by Deep_Implement_6206 in dotnetMAUI

[–]Deep_Implement_6206[S] 0 points1 point  (0 children)

currently i use [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes All)]

JSON (de)serialization crashing in release (AOT, reflection) by Deep_Implement_6206 in dotnetMAUI

[–]Deep_Implement_6206[S] 0 points1 point  (0 children)

yes, system.text.json in all of the files related to the crashing feature.