Context.JSON(v, ...opts)is the method which sends JSON responses to the client. It accepts the value and optional settings for rendering. The
JSONoptions structure looks like this:
Indentfield is empty and the application runs without optimizations, the
Indentfield will be automatically set to
while(1)we can do something like that:
jsonstruct tag. Look the exaple below:
ASCIIfield to generate ASCII-only JSON with escaped non-ASCII characters.