Is it possible to consider giving a warning if a Model Attribute is not valid?
An example is that [JsonIgnore] used using Newtonsoft.Json; in .NET Core 2.2 but in .NET Core 3.0 this was removed so the [JsonIgnore] attribute then had no effect but generates no errors or warnings.
The fix is to switch the using statement to:
using System.Text.Json;
using System.Text.Json.Serialization;
However it would be good if the serializer could support attributes to check validity helping to track down issues and save having to debug the compiled program.
Instead of a warning, could we consider supporting this attribute by name?
@layomia / @steveharter this is similar to the Newtonsof.JSON interpretation/compatibility that others have been asking for.
This gives the serializer more work to do on start up, which is an area we are focused on optimizing. Developers should examine all attributes and options if migrating to System.Text.Json.
Most helpful comment
Instead of a warning, could we consider supporting this attribute by name?