In case it helps anyone, I'm on .NET 8 and Newtonsoft.Json isn't supported yet. So, "explicitly" adding this help:
using System.Text.Json.Serialization;