format

package
v0.0.0-...-309e9be Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyFormat

type BodyFormat interface {

	//
	// Serialize object to byte array
	//
	Serialize(interface{}) ([]byte, error)

	//
	// Parse byte array to object
	//
	Parse([]byte, interface{}) error

	//
	// Get format type as string
	//
	GetType() string
}

BodyFormat is interface for yamp body format

type JsonBodyFormat

type JsonBodyFormat struct{}

JsonBodyFormat

func (*JsonBodyFormat) GetType

func (this *JsonBodyFormat) GetType() string

Returns type

func (*JsonBodyFormat) Parse

func (this *JsonBodyFormat) Parse(data []byte, v interface{}) error

Deserialize JSON

func (*JsonBodyFormat) Serialize

func (this *JsonBodyFormat) Serialize(obj interface{}) ([]byte, error)

Serialize JSON

Jump to

Keyboard shortcuts

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