1
0
Fork 0
golang-github-gofiber-fiber/docs/guide/faster-fiber.md
Daniel Baumann 6d002e9543
Adding upstream version 2.52.6.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-17 06:50:16 +02:00

1.2 KiB

id title sidebar_position
faster-fiber Make Fiber Faster 7

Custom JSON Encoder/Decoder

Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries:

package main

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

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

	# ...
}

References