github.com/gofiber/fiber/v2@v2.47.0/docs/guide/faster-fiber.md (about)

     1  ---
     2  id: faster-fiber
     3  title: ⚡ Make Fiber Faster
     4  sidebar_position: 7
     5  ---
     6  
     7  ## Custom JSON Encoder/Decoder
     8  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:
     9  - [goccy/go-json](https://github.com/goccy/go-json)
    10  - [bytedance/sonic](https://github.com/bytedance/sonic)
    11  - [segmentio/encoding](https://github.com/segmentio/encoding)
    12  - [mailru/easyjson](https://github.com/mailru/easyjson)
    13  - [minio/simdjson-go](https://github.com/minio/simdjson-go)
    14  - [wI2L/jettison](https://github.com/wI2L/jettison)
    15  
    16  ```go title="Example"
    17  package main
    18  
    19  import "github.com/gofiber/fiber/v2"
    20  import "github.com/goccy/go-json"
    21  
    22  func main() {
    23  	app := fiber.New(fiber.Config{
    24  		JSONEncoder: json.Marshal,
    25  		JSONDecoder: json.Unmarshal,
    26  	})
    27  
    28  	# ...
    29  }
    30  ```
    31  
    32  ### References
    33  - [Set custom JSON encoder for client](../api/client.md#jsonencoder)
    34  - [Set custom JSON decoder for client](../api/client.md#jsondecoder)
    35  - [Set custom JSON encoder for application](../api/fiber.md#config)
    36  - [Set custom JSON decoder for application](../api/fiber.md#config)