jsoniter

package
v0.0.0-...-1b5f944 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package jsoniter represents the interface codec implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
	// contains filtered or unexported fields
}

Codec predetermines the consistency of the interfaces codec implementation.

func New

func New() *Codec

New is a Codec constructor.

func (*Codec) Marshal

func (c *Codec) Marshal(v interface{}) ([]byte, error)

Marshal interface value marshalling into byte slice.

func (*Codec) MarshalIndent

func (c *Codec) MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)

MarshalIndent interface value marshalling with indent into byte slice. If the prefix is not empty, then the standard json is used, since in jsoniter prefix is not supported.

func (*Codec) Unmarshal

func (c *Codec) Unmarshal(data []byte, v interface{}) error

Unmarshal unmarshalling byte slice value into interface value.

func (*Codec) UnmarshalWithDisallowUnknownFields

func (c *Codec) UnmarshalWithDisallowUnknownFields(data []byte, v interface{}) error

UnmarshalWithDisallowUnknownFields unmarshalling byte slice value (with disallow unknown fields) into interface value.

Jump to

Keyboard shortcuts

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