gin icon indicating copy to clipboard operation
gin copied to clipboard

Dev json engine

Open ChenPuChu opened this issue 1 year ago • 5 comments

  • Implemented a user-customizable JSON render function
    • This function does not disrupt the implementation of the original function
    • This function is implemented through the factory mode
    • This is my first time submitting a fix. Maybe my code is not standard. If there is anything wrong, please feel free to correct me.

Fixes #4094

ChenPuChu avatar Nov 15 '24 18:11 ChenPuChu

@JimChenWYU

ChenPuChu avatar Nov 16 '24 11:11 ChenPuChu

I don't know your pr how to fix his problem. In my understood, he just want to change response body in his gin-middleware

JimChenWYU avatar Dec 22 '24 09:12 JimChenWYU

@JimChenWYU thanks for answering. To be more clear, what I want is that, when modifying the response, I want to keep the same "format" the user used.

So, my middleware can't know whether the user used c.indentedjson, or c.json to format the output

manuelarte avatar Jul 17 '25 09:07 manuelarte

@manuelarte Okay, this is your guideline

ChenPuChu avatar Sep 08 '25 06:09 ChenPuChu

So, in my middleware function, what would I need to write to retrieve what render was used?

manuelarte avatar Sep 08 '25 07:09 manuelarte