แก้ไข

แชร์ผ่าน


Handle missing members during deserialization

By default, if the JSON payload you're deserializing contains properties that don't exist in the deserialized plain old CLR object (POCO) type, they're simply ignored. Starting in .NET 8, you can specify that all members must be present in the payload. If they're not, a JsonException exception is thrown. You can configure this behavior in one of three ways: