jsoncodec

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package jsoncodec 集中封装 ORM 内部 JSON 编解码能力。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeStrict

func DecodeStrict(reader io.Reader, target any) error

DecodeStrict 从流中解码 JSON,并拒绝目标结构体未声明的字段。

func Marshal

func Marshal(value any) ([]byte, error)

Marshal 使用 Sonic 快速序列化 JSON。

func Unmarshal

func Unmarshal(data []byte, target any) error

Unmarshal 使用 Sonic 快速反序列化 JSON 字节。

func UnmarshalString

func UnmarshalString(value string, target any) error

UnmarshalString 使用 Sonic 快速反序列化 JSON 字符串。

func Valid

func Valid(data []byte) bool

Valid 判断字节内容是否为合法 JSON。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL