jsonutil

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package jsonutil provides the project's standard-library-compatible Sonic JSON API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

Marshal returns the JSON encoding of value using Sonic's standard-compatible configuration.

func MarshalIndent

func MarshalIndent(value any, prefix string, indent string) ([]byte, error)

MarshalIndent returns the indented JSON encoding of value using Sonic's standard-compatible configuration.

func NewDecoder

func NewDecoder(reader io.Reader) sonic.Decoder

NewDecoder returns a standard-compatible Sonic streaming decoder.

func NewEncoder

func NewEncoder(writer io.Writer) sonic.Encoder

NewEncoder returns a standard-compatible Sonic streaming encoder.

func Unmarshal

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

Unmarshal decodes data into value using Sonic's standard-compatible configuration.

func Valid

func Valid(data []byte) bool

Valid reports whether data is a valid JSON encoding.

Types

type RawMessage

type RawMessage = stdjson.RawMessage

RawMessage is a raw encoded JSON value.

Jump to

Keyboard shortcuts

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