Home / File/ jsoniter.go — gin Source File

jsoniter.go — gin Source File

Architecture documentation for jsoniter.go, a go file in the gin codebase. 1 imports, 0 dependents.

File go GinCore Routing 1 imports 1 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  fe55425c_f215_a31a_8fcc_6a60938f900a["jsoniter.go"]
  0d816439_76ee_c7fb_5329_a059811a793a["io"]
  fe55425c_f215_a31a_8fcc_6a60938f900a --> 0d816439_76ee_c7fb_5329_a059811a793a
  style fe55425c_f215_a31a_8fcc_6a60938f900a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// Copyright 2025 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.

//go:build jsoniter

package json

import (
	"io"

	jsoniter "github.com/json-iterator/go"
)

// Package indicates what library is being used for JSON encoding.
const Package = "github.com/json-iterator/go"

func init() {
	API = jsoniterApi{}
}

var json = jsoniter.ConfigCompatibleWithStandardLibrary

type jsoniterApi struct{}

func (j jsoniterApi) Marshal(v any) ([]byte, error) {
	return json.Marshal(v)
}

func (j jsoniterApi) Unmarshal(data []byte, v any) error {
	return json.Unmarshal(data, v)
}

func (j jsoniterApi) MarshalIndent(v any, prefix, indent string) ([]byte, error) {
	return json.MarshalIndent(v, prefix, indent)
}

func (j jsoniterApi) NewEncoder(writer io.Writer) Encoder {
	return json.NewEncoder(writer)
}

func (j jsoniterApi) NewDecoder(reader io.Reader) Decoder {
	return json.NewDecoder(reader)
}

Domain

Subdomains

Functions

Classes

Types

Dependencies

  • io

Frequently Asked Questions

What does jsoniter.go do?
jsoniter.go is a source file in the gin codebase, written in go. It belongs to the GinCore domain, Routing subdomain.
What functions are defined in jsoniter.go?
jsoniter.go defines 1 function(s): init.
What does jsoniter.go depend on?
jsoniter.go imports 1 module(s): io.
Where is jsoniter.go in the architecture?
jsoniter.go is located at codec/json/jsoniter.go (domain: GinCore, subdomain: Routing, directory: codec/json).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free