jsonx

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package jsonx - an extension of json-iterator library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode added in v0.0.13

func Decode[T any](src string) (v T, err error)

Decode - decodes given string to a specified value.

func Encode

func Encode[T any](v T) string

Encode - encodes given value to string value.

func Marshal

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

Marshal - same as json.Marshal.

func MarshalIndent

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

MarshalIndent - same as json.MarshalIndent.

func MarshalToString

func MarshalToString(v any) (string, error)

MarshalToString - same as Marshal but returns a string value.

func Unmarshal

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

Unmarshal - same as json.Unmarshal.

func UnmarshalFromString

func UnmarshalFromString(str string, v any) error

UnmarshalFromString - same as Unmarshal but reads value from a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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