JSON also sets the content header to application/json.
    1. Name string
    2. Age uint8
    3. }
    4. app.Get("/json", func(c *fiber.Ctx) error {
    5. // Create data struct:
    6. Name: "Grame",
    7. Age: 20,
    8. }
    9. return c.JSON(data)
    10. // => Content-Type: application/json
    11. return c.JSON(fiber.Map{
    12. "name": "Grame",
    13. "age": 20,
    14. })
    15. // => Content-Type: application/json
    16. })