joukevandermaas / saule

JSON API library for ASP.Net Web API 2.
https://joukevandermaas.github.io/saule
MIT License
76 stars 37 forks source link

Support optional fields in resource object #121

Open bxh opened 8 years ago

bxh commented 8 years ago

Per JSON API spec, attributes, relationships and links are optional. However, in Saule they are always provided. This could cause unexpected behaviors for JSON API clients such as Ember Data. And although link is a neat feature, it takes up additional space. I'm wondering if the community here is willing to make those fields optional like included?

joukevandermaas commented 8 years ago

I'm very much in favor of leaving out optional keys when they are empty. Sounds like a good feature to me.