Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
https://stackoverflow.com/questions/37995738/json-net-how-to-make-defaultvaluehandling-only-apply-to-certain-types by dbc_MinLength
Environment version: .NET 9.0.0 (9.0.0)
Newtonsoft.Json version: Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed

Testing exclusion of default values of type System.Nullable`1[System.Boolean]:
{
  "username": null,
  "password": "123",
  "deviceModel": null,
  "version": null,
  "returnDeviceType": true
}
Testing exclusion of default values of type System.String:
{
  "password": "123",
  "includeUrls": null,
  "returnDeviceType": true,
  "returnUpdatePromptVersions": null
}
Cached Result
Last Run: 3:06:35 am
Compile: 0.033s
Execute: 0.17s
Memory: 17.92Mb
CPU: 0.203s