Back to Fiber

⚡ Make Fiber Faster

docs/guide/faster-fiber.md

3.2.0956 B
Original Source

Custom JSON Encoder/Decoder

Fiber defaults to the standard encoding/json for stability and reliability. If you need more speed, consider these libraries:

go
package main

import "github.com/gofiber/fiber/v3"
import "github.com/goccy/go-json"

func main() {
    app := fiber.New(fiber.Config{
        JSONEncoder: json.Marshal,
        JSONDecoder: json.Unmarshal,
    })

    // ...
}

References