Skip to content

Inclusion of Null data values in serialized API output #3

Discussion options

You must be logged in to vote

I've talked about a few examples before in slack about why you might sometimes want to include null properties, but I can add an expanded use-case here.

Example Problem

The one case that I find most interesting is in testing API expansion.
We can use a real example from network-configuration-service as to why (for one reason at least) it returns nulls.

So let's consider an endpoint that fetches a dc4 company.
So you make your GET /company endpoint, which has a few properties:

{
   "id": 10,
   "name": "MyCoolCompany Inc",
   "active": true
}

But after a while of NCS being released, there was a desire to tie Identity orgs and dc4 companies together. They had been tied somewhat through Iden…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@eggilbert
Comment options

@travisgosselin
Comment options

@travisgosselin
Comment options

Answer selected by travisgosselin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
major-change Contract breaking modification to existing API Standard details.
4 participants