Skip to content
ADP
API Design PrincipleBETA

[ADP-321] Omit Empty

Guidelines

  • Although null and absent has the same semantic, SHOULD omit optional properties when they are empty or null.
  • MUST NOT include null values for optional properties.
  • SHOULD consider the semantic difference between an absent property and an explicitly set null value.

Examples

DO

json
{
  "paymentMethod": "INVOICE_SINGLE"
}

DON'T

json
{
  "paymentMethod": "INVOICE_SINGLE",
  "installments": null
}