serializers

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package serializers created on 2017/6/22.

Index

Constants

View Source
const (
	//JsonEncoder is a variable of type string
	JsonEncoder = `application/json`
)

Variables

This section is empty.

Functions

func Decode

func Decode(serializersType string, data []byte, obj interface{}) error

Decode is a convenience wrapper for decoding data into an Object.

func Encode

func Encode(serializersType string, obj interface{}) ([]byte, error)

Encode is a convenience wrapper for encoding to a []byte from an Encoder

Types

type Serializer

type Serializer interface {
	Encode(obj interface{}) ([]byte, error)
	Decode(data []byte, obj interface{}) error
}

Serializer is a interface which declares encode and decode methods

Directories

Path Synopsis
Package json is used for marshalling and unmarshalling
Package json is used for marshalling and unmarshalling

Jump to

Keyboard shortcuts

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