Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)KA
Posts
1
Comments
939
Joined
2 yr. ago

  • The biggest reason for me is that it's less data to send over a network. Especially when I'm working with lists of objects, including null fields can add a noticeable chunk to the payload.

    There are some cases where it might be worth it to differentiate "No value" and "No attribute", but in most cases they can be treated the same, since the data should really be validated against a schema anyway.

  • Yeah, I'm also confused. If an attribute is null, I would prefer to simply not serialize it.

    I'm sure there are edge cases where someone might prefer to include null attributes, but generally they should be treated the same either way.