Closed cbuddeke closed 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
- M src/DefaultJsonResponseNegotiator.cs https://github.com/CarterCommunity/Carter/pull/190/files#diff-0 (8)
- M src/IResponseNegotiator.cs https://github.com/CarterCommunity/Carter/pull/190/files#diff-1 (2)
- M src/Response/ResponseExtensions.cs https://github.com/CarterCommunity/Carter/pull/190/files#diff-2 (8)
- M test/Carter.Tests/ContentNegotiation/ResponseNegotiatorTests.cs https://github.com/CarterCommunity/Carter/pull/190/files#diff-3 (8)
Patch Links:
- https://github.com/CarterCommunity/Carter/pull/190.patch
- https://github.com/CarterCommunity/Carter/pull/190.diff
— 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 .
I have a need to be able to return fields even if they are null, so I included an optional argument to allow that.