CarterCommunity / Carter

Carter is framework that is a thin layer of extension methods and functionality over ASP.NET Core allowing code to be more explicit and most importantly more enjoyable.
MIT License
2.08k stars 175 forks source link

Include optional argument to return null fields in json response #190

Closed cbuddeke closed 5 years ago

cbuddeke commented 5 years ago

I have a need to be able to return fields even if they are null, so I included an optional argument to allow that.

jchannon commented 5 years ago

Thanks for this.

I think for now you'll have to register your own response negoatiator to get this feature.

What I'd like to do in the future is expose a jsonsettings feature in the carter options.

However, in asp.net core 3 they are changing json serialization and removing json.net dependency so wlll be interesting to see what they do and i could maybe bubble it up to carter possibly.

On Fri, 22 Mar 2019 at 21:04, Charles Buddeke notifications@github.com wrote:

I have a need to be able to return fields even if they are null, so I included an optional argument to allow that.

You can view, comment on, or merge this pull request online at:

https://github.com/CarterCommunity/Carter/pull/190 Commit Summary

  • Include optional argument to return null fields in json response

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CarterCommunity/Carter/pull/190, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGapiL4aYWplMzZmsuUE-UT5rd0_yNjks5vZUVYgaJpZM4cEais .