trailblazer / roar-jsonapi

JSON API support for Roar.
http://trailblazer.to/gems/roar/jsonapi.html
MIT License
42 stars 18 forks source link

Representer attributes with null values are excluded from resource document #34

Closed fran-worley closed 6 years ago

fran-worley commented 6 years ago

Attributes with null values are excluded from resource document.

Per the JSONAPI spec: If a request does not include all of the attributes for a resource, the server MUST interpret the missing attributes as if they were included with their current values. The server MUST NOT interpret missing attributes as null values.

By not including attributes with null values, API consumers will treat their values as unchanged, rather than NULL.