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

Prettify each response #204

Closed Matias-Barrios closed 4 years ago

Matias-Barrios commented 4 years ago

How can I tell the framework that I want the property Formatting.Indented to ALL the responses?

In which file should I add this and how?

I'm using NewtonSoft JSON library.

jchannon commented 4 years ago

Copy paste this into your solution and add the required settings: https://github.com/CarterCommunity/Carter/blob/master/src/DefaultJsonResponseNegotiator.cs

Carter will auto register your implementation with the IOC container

On Mon, 16 Sep 2019 at 13:21, Matias.Barrios notifications@github.com wrote:

How can I tell the framework that I want the property Formatting.Indented to ALL the responses?

In which file should I add this and how?

— 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/issues/204?email_source=notifications&email_token=AAAZVJQQ2XJCHETN3MU4GYLQJ525TA5CNFSM4IXBPRAKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLSCMZQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAZVJSQKSADIENDJIT44LLQJ525TANCNFSM4IXBPRAA .

Matias-Barrios commented 4 years ago

Thanks!!