jsoniter2schema

package
v0.0.0-...-f543487 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package jsoniter2schema 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) ConverterRegistrationForDecodeOutURLValues

func (c *Codec) ConverterRegistrationForDecodeOutURLValues(value interface{}, converterFunc func(string) reflect.Value)

ConverterRegistrationForDecodeOutURLValues registers a converter for decode to url.Values.

func (*Codec) Decode

func (c *Codec) Decode(dst interface{}, src io.Reader) error

Decode decode io.Reader to dst.

func (*Codec) DecodeOutURLValues

func (c *Codec) DecodeOutURLValues(dst interface{}, src url.Values) error

DecodeOutURLValues decodes dst to url.Values.

func (*Codec) DecodeStringBase64

func (c *Codec) DecodeStringBase64(str string) (string, error)

DecodeStringBase64 decodes a string the base-64.

func (*Codec) DecodeWithDisallowUnknownFields

func (c *Codec) DecodeWithDisallowUnknownFields(dst interface{}, src io.Reader) error

DecodeWithDisallowUnknownFields decode io.Reader to dst with disallow unknown fields.

func (*Codec) EncodeStringToBase64

func (c *Codec) EncodeStringToBase64(str string) string

EncodeStringToBase64 encodes a string in base-64.

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