zcsizmadia / ZCS.DataContractResolver

MIT License
14 stars 1 forks source link

Port Newtonsoft.Json tests #60

Closed symbiogenesis closed 6 months ago

symbiogenesis commented 6 months ago

This pulls in and ports the Newtonsoft.Json tests and converts the existing tests to XUnit.

Fixes #59

symbiogenesis commented 6 months ago

My discoveries were:

  1. The ContractResolverTests from Newtonsoft.Json expected DefaultValueAttribute to be respected.

    However, DefaultValueAttribute is not technically part of the DataContract concept, nor is it respected by System.Text.Json

    But it effectively is used that way, I think. Something to think about.

  2. The IgnoreIsSpecifiedMembers feature doesn't seem supported.

  3. Don't think RequiredAttribute is being handled correctly. Opened #61

@zcsizmadia

zcsizmadia commented 6 months ago

Thanks for the PR!